上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2021噗,自己太弱想不到。原来是2次背包。由于只要有一个大于k的高度的,而且这个必须放在最顶,那么我们就可以枚举每一个比k大的放在最顶,其它的都放在下边即可。还有,注意这是完全背包!#include #... 阅读全文
posted @ 2014-09-16 05:53 iwtwiioi 阅读(516) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1661暴力大法好。。。枚举对角线(注意,一种对角线2种情况就行了,自己想。。。)然后可以算出其它两个点,然后就暴力。。#include #include #include #include #inclu... 阅读全文
posted @ 2014-09-15 18:05 iwtwiioi 阅读(467) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2017这题太神了,我想了一个中午啊原来是看错题一直没理解题解说的,一直以为题解是错的QAQ“开始玩游戏时,第一个玩家可以从堆顶拿走一枚或两枚硬币”果然还是太弱我们发现,每一个阶段都由上一个玩家决定的,即... 阅读全文
posted @ 2014-09-15 17:25 iwtwiioi 阅读(1189) 评论(1) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2100这题我要吐血啊我交了不下10次tle。。噗果然是写挫了。一开始没加spfa优化果断t然后看了题解加了(加错了T_T)还是tle。。我就怀疑数据了。。。噗原来我有个地方打错了。。这个spfa的队列优... 阅读全文
posted @ 2014-09-15 06:11 iwtwiioi 阅读(501) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2101这个dp真是神思想orz设状态f[i, j]表示i~j先手所拿最大值,注意,是先手所以转移自然而然的变成f[i, j]=sum[i, j]-min(f[i+1, j], f[i, j-1])这个转... 阅读全文
posted @ 2014-09-15 05:24 iwtwiioi 阅读(389) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3404写挫好几次。。。。裸的博弈论即可。。#include #include #include #include #include #include #include using namespace s... 阅读全文
posted @ 2014-09-14 22:57 iwtwiioi 阅读(506) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3404裸的双端队列。。#include #include #include #include #include #include #include using namespace std;#define... 阅读全文
posted @ 2014-09-14 18:11 iwtwiioi 阅读(252) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3402又是spfa水题。。#include #include #include #include #include #include #include using namespace std;#defi... 阅读全文
posted @ 2014-09-14 17:56 iwtwiioi 阅读(192) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3400既然是倍数我们转换成mod。。设状态f[i][j]表示前i头牛modj的方案那么答案显然是f[n][0]其实这样就和背包差不多了,对于每个数但是转移比较难理解?(自己好好想吧。。)f[i][a%p... 阅读全文
posted @ 2014-09-14 17:49 iwtwiioi 阅读(597) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3399贪心就是将两组排序,然后直接模拟即可。。如果我们用a去匹配一个绝对值和它差不多的值,那么去匹配的那个位置显然要和它这个位置匹配,同样的高度差。。。自己理解吧。。#include #include ... 阅读全文
posted @ 2014-09-14 17:07 iwtwiioi 阅读(465) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3392同1674#include #include #include #include #include #include #include using namespace std;#define re... 阅读全文
posted @ 2014-09-14 16:43 iwtwiioi 阅读(267) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2020和背包差不多同样滚动数组f[j]表示当前位置j份食物的最小价值f[j]=min(f[j-l]+l*c) 1#include #include #include #include #include ... 阅读全文
posted @ 2014-09-14 16:32 iwtwiioi 阅读(366) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=2015这种水题真没啥好说的。。#include #include #include #include #include #include #include using namespace std;#de... 阅读全文
posted @ 2014-09-14 16:03 iwtwiioi 阅读(214) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1680看不懂英文。。题意是有n天,第i天生产的费用是c[i],要生产y[i]个产品,可以用当天的也可以用以前的(多生产的)。每单位产品保存一天的费用是s。求最小费用显然贪心,每次查找之前有没有哪一天保存... 阅读全文
posted @ 2014-09-14 15:55 iwtwiioi 阅读(353) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1665这题只要注意到“所有的落脚点至少相距300”就可以大胆的暴力了。对于每个点,我们枚举比他的x轴小1000内和大1000内的点连边,然后直接暴力出奇迹。#include #include #incl... 阅读全文
posted @ 2014-09-14 12:37 iwtwiioi 阅读(361) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1654请不要被这句话误导。。“如果两只成功跳圆舞的奶牛有绳索相连,那她们可以同属一个组合.”这句话没啥用。。#include #include #include #include #include #i... 阅读全文
posted @ 2014-09-14 11:28 iwtwiioi 阅读(356) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1675一开始我写了个枚举7个点。。。。。。。但是貌似。。。写挫了。然后我就写dfs。。判重好难写啊。。。。。本来用hash的。。但是对拍一直wa。。所以干脆用set。。然后将数值调大。。然后就过了。。然... 阅读全文
posted @ 2014-09-14 09:44 iwtwiioi 阅读(302) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1681太裸了。。#include #include #include #include #include #include #include using namespace std;#define re... 阅读全文
posted @ 2014-09-14 00:14 iwtwiioi 阅读(339) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1676太水的一题了。。差分直接搞。#include #include #include #include #include #include #include using namespace std;#... 阅读全文
posted @ 2014-09-13 23:58 iwtwiioi 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 为了锻炼自己的思维能力,我要刷cf的div2a和bQAQ(前一个flag都还没有开始QAQ 阅读全文
posted @ 2014-09-13 23:20 iwtwiioi 阅读(216) 评论(1) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页