![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cf题目
tjqACM
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #135 (Div. 2)VD. Choosing Capital for Treeland
D. Choosing Capital for Treelandtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe country Treeland consi原创 2014-09-03 20:18:56 · 540 阅读 · 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 · 395 阅读 · 0 评论 -
Codeforces Round #139 (Div. 2)C. Barcode
C. Barcodetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got an n × m pixel picture. Each pixel ca原创 2014-08-26 19:48:03 · 456 阅读 · 0 评论 -
Codeforces Beta Round #89 (Div. 2)D. Caesar's Legions
D. Caesar's Legionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGaius Julius Caesar, a famous general,原创 2014-08-25 19:38:04 · 685 阅读 · 0 评论 -
Codeforces Beta Round #2B. The least round way
B. The least round waytime limit per test5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere is a square matrix n × n, consi原创 2014-08-24 20:44:09 · 533 阅读 · 0 评论 -
Codeforces Round #112 (Div. 2) C. Another Problem on Strings
C. Another Problem on Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string is binary, if it con原创 2014-08-21 20:53:39 · 460 阅读 · 0 评论 -
cf div2(262)c题
C. Presenttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle beaver is a beginner programmer, so infor原创 2014-08-21 16:15:13 · 558 阅读 · 0 评论 -
Codeforces Beta Round #4 (Div. 2 Only)D. Mysterious Present
D. Mysterious Presenttime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputPeter decided to wish happy birthday t原创 2014-08-25 20:34:03 · 520 阅读 · 0 评论 -
Codeforces Round #135 (Div. 2)C. Color Stripe
C. Color Stripetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA colored stripe is represented by a horizo原创 2014-08-22 21:27:14 · 479 阅读 · 0 评论 -
Codeforces Round #202 (Div. 2)B. Color the Fence
B. Color the Fencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor has fallen in love with Tanya. Now原创 2014-08-22 21:03:14 · 499 阅读 · 0 评论 -
gym Bridges
题目大意:给你一个无向图,问我们最多加一条边使得图的桥的数量最小,输出最小数量解题思路:先将图缩点,我们就得到一个无环图,然后我们只需找到最长链,将其首尾相连即可减少对多的桥,减少的数量为链的长度,即树的直径。(ps:注释部分为并查集缩点)代码://#pragma comment(linker, "/STACK:1024000000,1024000000")#include#inclu原创 2015-08-18 20:17:13 · 569 阅读 · 0 评论