- 博客(292)
- 收藏
- 关注
原创 力扣322.零钱兑换
给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回-1。示例1:输入: coins = [1, 2, 5], amount = 11输出: 3解释: 11 = 5 + 5 + 1示例 2:输入: coins = [2], amount = 3输出: -1说明:...
2020-04-17 11:30:32 322
原创 php相关配置及相关基础知识点
PHP知识点:一.环境安装1、 LAMP=linux+apache+mysql+phpMysql与PHP之间的关系:C/S架构浏览器和apache之间的关系:B/S架构配置虚拟主机:① 先在E:\phpenv\apache\conf\extra的httpd-vhosts.conf中输入:DocumentRoot "E:/phpenv/homework"
2016-10-01 11:13:38 834
原创 hdoj 5665 Lucky 【水】
LuckyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 554 Accepted Submission(s): 327Problem Description Chaos August lik
2016-04-26 20:40:50 598
原创 zoj 3946 Highway Project【SPFA多个性质的最优化】
Highway ProjectTime Limit: 2 Seconds Memory Limit: 65536 KB Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from t
2016-04-25 21:53:29 482
原创 poj 3080 Blue Jeans 【kmp+暴力】
Blue JeansTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15694 Accepted: 6978DescriptionThe Genographic Project is a research partnership between IBM a
2016-04-25 19:18:05 468
原创 zzuli oj 1873: This offer 【dfs+数组标记技巧(set会超时)】
1873: This offerTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 210 Solved: 52SubmitStatusWeb BoardDescription话说WX入职已经有一个多月了,公司boss突然扔给他了一个问题,如果解决不了的话就会被开除掉 - -#,情急之下他只能来请教你了,boss给了他N个
2016-04-19 16:59:07 724
原创 zzuli 1872: Which Offer?【水】
1872: Which Offer?Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 183 Solved: 129SubmitStatusWeb BoardDescription经过不懈的努力,wx终于拿到了offer,果然搞ACM拿高薪呀~但是拿到offer的同时也犯了难,究竟该选择哪个offer呢,他决定用一个简单
2016-04-19 16:57:31 453
原创 zzuli oj 1871: NO offer <set容器的用法>
1871: NO offerTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 393 Solved: 167SubmitStatusWeb BoardDescription最近WX正在帝都苦逼的找工作,面对招聘网站上众多的公司,WX犯了难,不知道该投哪家公司了,最终他做了一个英(qi)明(pa)的决策,他决定从这些公司编
2016-04-19 16:12:21 649
原创 Problem 1606 - Funny Sheep
Problem 1606 - Funny Sheep Time Limit: 1000MS Memory Limit: 65536KB Total Submit: 612 Accepted: 169 Special Judge: NoDescriptionThere are N+1 rows and M+1 columns fence with N*M g
2016-04-09 22:18:09 364
原创 nyoj 714 Card Trick
Card Trick时间限制:1000 ms | 内存限制:65535 KB难度:3描述The magician shuffles a small pack of cards, holds it face down and performs the following procedure:The top card is moved to the bottom of
2016-04-09 21:44:17 589
原创 Problem 1603 - Minimum Sum 【好题】
Problem 1603 - Minimum Sum Time Limit: 2000MS Memory Limit: 65536KB Total Submit: 540 Accepted: 146 Special Judge: NoDescriptionThere are n numbers A[1] , A[2] .... A[n], you can
2016-04-09 19:29:07 261
原创 0-1背包总结
0-1背包总结: 0-1背包就是往一个固定体积的包里面如物品,看看能装的最大价值的物品的价值是多少!但是有时候他会将这个进行变形,但是百变不离其宗,只要抓住关键点(就是在一个固定的容器(不管是什么性质都行)装东西,使另一个标准达到最大值),剩下的就好算了!1. Hdoj 5501 The Highest Mark: 在固定时间内使分数达到最大值2.Hdoj 1864 最大报销额:在
2016-04-09 09:59:48 548
原创 nyoj 325 zb的生日【0-1背包】
zb的生日时间限制:3000 ms | 内存限制:65535 KB难度:2描述今天是阴历七月初五,acm队员zb的生日。zb正在和C小加、never在武汉集训。他想给这两位兄弟买点什么庆祝生日,经过调查,zb发现C小加和never都很喜欢吃西瓜,而且一吃就是一堆的那种,zb立刻下定决心买了一堆西瓜。当他准备把西瓜送给C小加和never的时候,遇到了一个难题,ne
2016-04-09 09:21:44 421
原创 hdoj 1203 I NEED A OFFER!【0-1背包+逆向思维】
I NEED A OFFER!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22750 Accepted Submission(s): 9104Problem DescriptionSpeakless
2016-04-09 09:20:02 520
原创 nyoj 890 又见01背包【0-1背包+逆向思维】
又见01背包时间限制:1000 ms | 内存限制:65535 KB难度:3描述 有n个重量和价值分别为wi 和 vi 的 物品,从这些物品中选择总重量不超过 W 的物品,求所有挑选方案中物品价值总和的最大值。 1 1 1 1 输入多组测试数据。每组测试数据第一行输入,n 和 W ,接下来有n行,每行输
2016-04-09 09:18:33 651
原创 nyoj 289 苹果【裸0-1背包】
苹果时间限制:3000 ms | 内存限制:65535 KB难度:3描述ctest有n个苹果,要将它放入容量为v的背包。给出第i个苹果的大小和价钱,求出能放入背包的苹果的总价钱最大值。输入有多组测试数据,每组测试数据第一行为2个正整数,分别代表苹果的个数n和背包的容量v,n、v同时为0时结束测试,此时不输出。接下来的n行,每行2个
2016-04-09 09:16:05 445
原创 hdoj 2602 Bone Collector【裸0-1背包】
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46309 Accepted Submission(s): 19282Problem DescriptionMany year
2016-04-09 09:13:03 440
原创 hdoj 2955 Robberies【对立事件+0-1背包】
RobberiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18678 Accepted Submission(s): 6892Problem DescriptionThe aspiring Ro
2016-04-09 09:11:18 434
原创 hdoj 2546 饭卡 【转化思维+0-1背包】
饭卡Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19642 Accepted Submission(s): 6851Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即
2016-04-09 09:09:15 390
原创 hdoj 1864 最大报销额【0-1背包变形】
最大报销额Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21045 Accepted Submission(s): 6308Problem Description现有一笔经费可以报销一定额度的发票。允
2016-04-09 09:07:18 351
原创 hdoj 5501The Highest Mark【贪心+0-1背包】
The Highest MarkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 885 Accepted Submission(s): 368Problem DescriptionThe SDOI
2016-04-09 09:04:26 353
原创 hdoj 1437 天气情况
天气情况Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 715 Accepted Submission(s): 292Problem Description如果我们把天气分为雨天,阴天和晴天3种,在给定
2016-04-04 16:52:17 366
原创 hdoj 1434 幸福列车【模拟】
幸福列车Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 2162 Accepted Submission(s): 666Problem Description一批幸福的列车即将从杭州驶向幸福的终点
2016-04-04 16:49:50 424
原创 hdoj 1433 Simply Syntax【模拟】
Simply SyntaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 416 Accepted Submission(s): 208Problem DescriptionIn the land of
2016-04-04 16:47:57 462
原创 hdoj 1432 Lining Up
Lining UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1261 Accepted Submission(s): 362Problem Description``How am I ever g
2016-04-04 16:46:55 283
原创 hdoj 1431 素数回文【打表+素数筛法+回文数判断】
素数回文Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16461 Accepted Submission(s): 3671Problem Descriptionxiaoou33对既是素数又是回文的数特
2016-04-04 16:45:11 1682
原创 hdoj 1429 胜利大逃亡(续)【bfs好题】
胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7340 Accepted Submission(s): 2544Problem DescriptionIgnatius再次被魔王抓走了(
2016-04-04 16:43:35 545
原创 hdoj 1428 漫步校园【bfs+dfs】
漫步校园Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3760 Accepted Submission(s): 1145Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房
2016-04-04 16:37:58 392
原创 hdoj 1427 速算24点【经典dfs】
速算24点Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4240 Accepted Submission(s): 1042Problem Description速算24点相信绝大多数人都玩过。就是随机
2016-04-04 16:35:54 802
原创 hdoj 1426 Sudoku Killer【数独】
Sudoku KillerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5999 Accepted Submission(s): 1919Problem Description自从2006年3月10日
2016-04-04 16:31:07 406
原创 hdoj 1425 sort
sortTime Limit: 6000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39336 Accepted Submission(s): 11427Problem Description给你n个整数,请按从大到小的顺序输出其
2016-04-04 16:29:17 311
原创 hdoj 1431 素数回文【素数筛法+回文数判断打表】
素数回文Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16391 Accepted Submission(s): 3637Problem Descriptionxiaoou33对既是素数又是回文的数特
2016-04-02 22:48:20 620
原创 nyoj 47 过河问题
过河问题时间限制:1000 ms | 内存限制:65535 KB难度:5描述在漆黑的夜里,N位旅行者来到了一座狭窄而且没有护栏的桥边。如果不借助手电筒的话,大家是无论如何也不敢过桥去的。不幸的是,N个人一共只带了一只手电筒,而桥窄得只够让两个人同时过。如果各自单独过桥的话,N人所需要的时间已知;而如果两人同时过桥,所需要的时间就是走得比较慢的那个人单独行
2016-03-26 18:10:01 378
原创 hdoj 1052Tian Ji -- The Horse Racing【贪心算法】
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24829 Accepted Submission(s): 7236Problem Description
2016-03-26 17:44:48 395
原创 poj 2773Happy 2006
Happy 2006Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 10620 Accepted: 3709DescriptionTwo positive integers are said to be relatively prime to each o
2016-03-26 11:19:40 346
原创 容斥原理模板
求1到m中与n互质的数的个数#include #include #include using namespace std;int p[10]={0};int k;void getp(int n){ k=0; for(int i=2;i*i<=n;i++) { if(n%i==0) { p[k++]=i; } while(n%i==0) n/=i
2016-03-26 10:39:55 580
原创 hdoj 4135 Co-prime
Co-primeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3004 Accepted Submission(s): 1164Problem DescriptionGiven a number N,
2016-03-26 10:22:58 318
原创 poj3904 Sky Code【容斥原理】
Sky CodeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1977 Accepted: 635DescriptionStancu likes space travels but he is a poor software developer and
2016-03-25 21:43:50 463
原创 hpu 1799 循环多少次?
循环多少次?Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3827 Accepted Submission(s): 1460Problem Description 我们知道,在编程中,我们时常需
2016-03-15 19:47:42 699
原创 CodeForces 597A(公式+技巧)
I - DivisibilityTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 597ADescriptionFind the number of k-divisible numbe
2016-03-12 18:12:43 541
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人