05 2015 档案

摘要:Problem DescriptionHere are n Candidates in one election. Every Candidate could vote any one (of course himself/herself). In this election, the one wh... 阅读全文
posted @ 2015-05-28 17:33 不会起昵称 阅读(133) 评论(0) 推荐(0)
摘要:Problem DescriptionZCC has got N strings. He is now playing a game with Miss G.. ZCC will pick up two strings among those N strings randomly(A string ... 阅读全文
posted @ 2015-05-21 23:04 不会起昵称 阅读(138) 评论(0) 推荐(0)
摘要:省赛总结 省赛打完了,结果在意料之中,教主的判断还是很准的,我们的水平在银牌区中段,运气好可以进金牌区。感觉队伍打的还不错,感谢给力的队友,但感觉我个人还是打的有点乱。 开场我先简单整体的翻了一下习题册,依旧abc一人一题,我开b,李睿易a王成瑞c,b读读感觉是个模拟,尽管感觉不难,但是... 阅读全文
posted @ 2015-05-14 17:20 不会起昵称 阅读(542) 评论(4) 推荐(0)
摘要:Problem DescriptionWLD likes playing with a sequencea[1..N]. One day he is playing with a sequence ofNintegers. For every index i, WLD wants to find t... 阅读全文
posted @ 2015-05-01 15:31 不会起昵称 阅读(137) 评论(1) 推荐(0)
摘要:简单的多重背包问题,要使设备的体积之和尽量均匀的分成两部分,设总体积为v2 则该问题就转化成了一个背包容量为v/2的多重背包问题费用和价值都为设备的体积,根据num[i] * cost[i] 是否小于 v / 2转化为01背包和完全背包做 1 #include 2 #include 3 #inclu... 阅读全文
posted @ 2015-05-01 14:10 不会起昵称 阅读(199) 评论(1) 推荐(0)
摘要:01 背包 状态转移方程 dp[j] = max{dp[j], 1 - (1 - dp[j - cost[i]]) * (1 - val[i]))}; 1 #include 2 #include 3 #include 4 #include 5 #define mem(a) memset(a, 0, ... 阅读全文
posted @ 2015-05-01 13:08 不会起昵称 阅读(126) 评论(0) 推荐(0)
摘要:简单01背包状态转移方程 dp[j] = max{dp[j], dp[j - volume[i]] + value[i]}; 1 #include 2 #include 3 #include 4 #define mem(a) memset(a, 0, sizeof(a)) 5 using names... 阅读全文
posted @ 2015-05-01 12:55 不会起昵称 阅读(127) 评论(0) 推荐(0)