cf题目
文章平均质量分 69
tjqACM
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #135 (Div. 2)VD. Choosing Capital for Treeland
D. Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The country Treeland consi原创 2014-09-03 20:18:56 · 619 阅读 · 0 评论 -
amman D.Alternating Strings
题意:给你一个01串,现在让你将他简称几段,是的每段每段串01不交替出现且长度不超过k,01不交替即(1010,0101)不符合,但(10100,00101)是符合的,问你最少剪多少刀,使得每段符合要求 解题思路:用dp[i],表是在第i各位字后面剪一刀的时的最小剪的次数,转移即为dp[i]=dp[j]+1,如果j 到 i的满足条件 否则dp[i]=dp[j]原创 2015-08-18 21:06:24 · 463 阅读 · 0 评论 -
Codeforces Round #139 (Div. 2)C. Barcode
C. Barcode time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You've got an n × m pixel picture. Each pixel ca原创 2014-08-26 19:48:03 · 517 阅读 · 0 评论 -
Codeforces Beta Round #89 (Div. 2)D. Caesar's Legions
D. Caesar's Legions time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gaius Julius Caesar, a famous general,原创 2014-08-25 19:38:04 · 793 阅读 · 0 评论 -
Codeforces Beta Round #2B. The least round way
B. The least round way time limit per test 5 seconds memory limit per test 64 megabytes input standard input output standard output There is a square matrix n × n, consi原创 2014-08-24 20:44:09 · 598 阅读 · 0 评论 -
Codeforces Round #112 (Div. 2) C. Another Problem on Strings
C. Another Problem on Strings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A string is binary, if it con原创 2014-08-21 20:53:39 · 538 阅读 · 0 评论 -
cf div2(262)c题
C. Present time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little beaver is a beginner programmer, so infor原创 2014-08-21 16:15:13 · 704 阅读 · 0 评论 -
Codeforces Beta Round #4 (Div. 2 Only)D. Mysterious Present
D. Mysterious Present time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Peter decided to wish happy birthday t原创 2014-08-25 20:34:03 · 599 阅读 · 0 评论 -
Codeforces Round #135 (Div. 2)C. Color Stripe
C. Color Stripe time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A colored stripe is represented by a horizo原创 2014-08-22 21:27:14 · 550 阅读 · 0 评论 -
Codeforces Round #202 (Div. 2)B. Color the Fence
B. Color the Fence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Igor has fallen in love with Tanya. Now原创 2014-08-22 21:03:14 · 567 阅读 · 0 评论 -
gym Bridges
题目大意:给你一个无向图,问我们最多加一条边使得图的桥的数量最小,输出最小数量 解题思路:先将图缩点,我们就得到一个无环图,然后我们只需找到最长链,将其首尾相连即可减少对多的桥,减少的数量为链的长度,即树的直径。(ps:注释部分为并查集缩点) 代码://#pragma comment(linker, "/STACK:1024000000,1024000000") #include #inclu原创 2015-08-18 20:17:13 · 646 阅读 · 0 评论
分享