随笔分类 - DP&&递推
摘要:Father Christmas flymouse Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 3241 Accepted: 1099 Description After retirement as contestant f
阅读全文
摘要:The Largest Clique 题意:求一个节点数最大的节点集,使任意两个节点至少从一个可以到另一个 同一个SCC要选一定全选 求SCC 缩点建一个新图得到一个DAG,直接DP行了 这个新图不需要判重边,重边就是真实存在
阅读全文
摘要:Rank11:260=60+100+100 P2409 Y的积木 题目背景 Y是个大建筑师,他总能用最简单的积木拼出最有创意的造型。 题目描述 Y手上有n盒积木,每个积木有个重量。现在他想从每盒积木中拿一块积木,放在一起,这一堆积木的重量为每块积木的重量和。现在他想知道重量和最小的k种取法的重量分别
阅读全文
摘要:Proud Merchants Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 5599 Accepted Submission(s): 236
阅读全文
摘要:Team Them Up! Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7608 Accepted: 2041 Special Judge Description Your task is to divide a number
阅读全文
摘要:Audiophobia Consider yourself lucky! Consider yourself lucky to be still breathing and having fun participating in this contest. But we apprehend that
阅读全文
摘要:UVA - 11021 Tribles GRAVITATION, n. “The tendency of all bodies to approach one another with a strength proportion to the quantity of matter they cont
阅读全文
摘要:Double Patience Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 694 Accepted: 368 Case Time Limit: 1000MS Special Judge Description Double
阅读全文
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13677 Accepted: 9697 Description In the Fibonacci integer sequence, F0 = 0, F1 =
阅读全文
摘要:题目名 双色球 魔方 czy的后宫 mex 源文件 ball.cpp/c/pas cube.cpp/c/pas harem.cpp/c/pas mex.cpp/c/pas 输入文件 ball.in cube.in harem.in mex.in 输出文件 ball.out cube.out hare
阅读全文
摘要:题目描述 Farmer John's cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them. Initially a stack of N (5 <=
阅读全文
摘要:NOIP模拟赛2016-10-22 题目名 东风谷早苗 西行寺幽幽子 琪露诺 上白泽慧音 源文件 robot.cpp/c/pas spring.cpp/c/pas iceroad.cpp/c/pas classroom.cpp/c/pas 输入文件 robot.in spring.in iceroa
阅读全文
摘要:Color Length 白书 很明显f[i][j]表示第一个取到i第二个取到j的代价 问题在于代价的计算,并不知道每种颜色的开始和结束 和模拟赛那道环形DP很想,计算这次转移会给其他的元素带来的代价,也就是转移前已经出现但还没结束的元素都会代价+1 预处理每种颜色在两个序列中出现的位置bg[i][
阅读全文
摘要:People in Cubeland use cubic coins. Not only the unit of currency iscalled a cube but also the coins are shaped like cubes and their valuesare cubes.
阅读全文
摘要:UVA - 11584 Partitioning by Palindromes We say a sequence of char- acters is a palindrome if it is the same written forwards and backwards. For exampl
阅读全文
摘要:Tour Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4307 Accepted: 1894 Description John Doe, a skilled pilot, enjoys traveling. While on
阅读全文
摘要:UVA - 1025 A Spy in the Metro Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling eve
阅读全文
摘要:3037 线段覆盖 5 时间限制: 3 s 空间限制: 256000 KB 题目等级 : 钻石 Diamond 题解 3037 线段覆盖 5 3037 线段覆盖 5 时间限制: 3 s 空间限制: 256000 KB 题目等级 : 钻石 Diamond 时间限制: 3 s 空间限制: 256000
阅读全文
摘要:Problem 1 护花(flower.cpp/c/pas) 【题目描述】 约翰留下他的N(N<=100000)只奶牛上山采木.他离开的时候,她们像往常一样悠闲地在草场里吃草.可是,当他回来的时候,他看到了一幕惨剧:牛们正躲在他的花园里,啃食着他心爱的美丽花朵!为了使接下来花朵的损失最小,约翰赶紧采
阅读全文
摘要:1、传教士(bishop) 问题描述: panzhili王国的疆土恰好是一个矩形,为了管理方便,国王jjs将整个疆土划分成N*M块大小相同的区域。由于jjs希望他的子民也能信教爱教(”打拳”神教),所以他想安排一些传教士到全国各地去传教。但这些传教士的传教形式非常怪异,他们只在自己据点周围特定的区域
阅读全文

浙公网安备 33010602011771号