![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforces
_zidaoziyan
这个作者很懒,什么都没留下…
展开
-
Good Bye 2014
B.给你一个n,然后一个1-n的排列,然后一个n*n的0,1矩阵,如果mp[i][j]==1,那么表示i和j是可交换的,求最后可交换得到的序列的字典序最小是最多少。(n 思路:这个题类似于冒泡排序,如果几个点之间是能够相互到达的,那么这几个点的序列可以为原来这几个点的任意排序。所以我们只要判断哪几个点之间是相互可到达的(利用并查集或者forld),然后逐步去最优就可原创 2016-07-20 20:22:13 · 284 阅读 · 0 评论 -
Codeforces Round #353 (Div. 2) B. Restoring Painting(方块内放数,问有多少种不同的放法)
B. Restoring Paintingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya works as a watchman in the g原创 2016-05-17 16:39:26 · 392 阅读 · 0 评论 -
CodeforcesBeta Round #19 D. Points(找出平面上坐标严格大于(x,y)的点)
D. Pointstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPete and Bob invented a new interesting game. Bob原创 2016-04-30 16:19:28 · 605 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) D. Graph Coloring(最少需要选择多少个点,使得所有边的颜色相同)
D. Graph Coloringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirected graph that con原创 2016-04-26 20:17:41 · 684 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) C. International Olympiad(求第一次出现这种数字结尾的是哪一个年份)
C. International Olympiadtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInternational Abbreviation Olympia原创 2016-04-25 19:44:52 · 651 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) B. Rebus(给你一个等式里面只含加减号凑出一个数)
B. Rebustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rebus of form ? + ? - ? + ? = n, co原创 2016-04-25 15:54:40 · 526 阅读 · 0 评论 -
Codeforces Round #340 (Div. 2)C. Watering Flowers
C. Watering Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA flowerbed has many flowers and two fo原创 2016-03-01 10:31:59 · 379 阅读 · 0 评论 -
Codeforces Round #340 (Div. 2) E. XOR and Favorite Number
E. XOR and Favorite Numbertime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob has a favorite number k and原创 2016-03-01 10:07:13 · 292 阅读 · 0 评论 -
hdu校赛 F
Problem FTime Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 76 Accepted Submission(s): 25Problem DescriptionA social network is原创 2016-03-21 18:16:51 · 358 阅读 · 0 评论 -
hdu2016校赛 C
Problem CTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 299 Accepted Submission(s): 180Problem DescriptionAlice 和 Bob 又在玩游戏了原创 2016-03-21 17:55:04 · 407 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) D. Messenger
D. Messengertime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputEach employee of the "Blake Techologies" compa原创 2016-03-21 11:38:23 · 410 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) C. Report
C. Reporttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEach month Blake gets the report containing main原创 2016-03-21 11:28:13 · 364 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) E. Correct Bracket Sequence Editor (括号匹配和删除,输出最后的括号序列)
E. Correct Bracket Sequence Editortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Polycarp starte原创 2016-05-08 15:22:25 · 1002 阅读 · 0 评论 -
hdu Rigid Frameworks(刚体图->二分图计数)
计算机科学中,图可以看做是点集和边集所组成的二元组。通过给每个点设置一个平面坐标,图可以镶嵌在欧几里得平面中。一个图被认为是刚体,如果该图无法只改变其中一部分的形状,而使得余下的部分的形状保持不变。例如上图中的 (a) (b) (c) 都是刚体。为了简化问题,我们现在只考虑 n × m 的原创 2016-07-24 15:52:09 · 883 阅读 · 3 评论 -
Codeforces Round #364 (Div. 2) E. Connecting Universities(从一棵树上挑出n*2个点,两两匹配,求总距离的最大值)
E. Connecting Universitiestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTreeland is a country in which t原创 2016-07-23 12:33:56 · 1194 阅读 · 0 评论 -
Codeforces Round #364 (Div. 2) D. As Fast As Possible
D. As Fast As Possibletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn vacations n pupils decided to go o原创 2016-07-23 12:26:35 · 1682 阅读 · 1 评论 -
VK Cup 2016 - Round 2 D. Little Artem and Random Variable(已知两个撒子掷出的点数较大为1,2,...,n的概率,较小为1,2,...,n概率)
D. Little Artem and Random Variabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Artyom decided t原创 2016-05-09 10:04:47 · 537 阅读 · 0 评论 -
Codeforces Round #348 E. Little Artem and Time Machine(给你一个n,有三种选择,1表示增加一个值,2表示删除这个数的一个值,3表示查询)
E. Little Artem and Time Machinetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Artem has invented原创 2016-05-09 09:52:30 · 891 阅读 · 0 评论 -
Codeforces Round #348 DIV2 C. Little Artem and Matrix(将矩阵的第x行向左边旋转一位,将矩阵的第y列向上边旋转一位,现在的第x,y位置为z)
C. Little Artem and Matrixtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Artem likes electronics.原创 2016-05-08 18:22:40 · 785 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) F. Restore a Number(有一位数为n的数,在后面添上n这个数,然后将所有的数字打乱输出,再给你一串原数字的子串,输出最小)
F. Restore a Numbertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya decided to pass a very large inte原创 2016-05-08 15:49:35 · 1230 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) B. Print Check
B. Print Checktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKris works in a large company "Blake Technolo原创 2016-03-21 11:17:17 · 417 阅读 · 0 评论 -
Codeforces Round #345 (Div. 1) D. Zip-line
D. Zip-linetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has decided to build a zip-line on trees原创 2016-03-21 10:49:06 · 568 阅读 · 0 评论 -
Educational Codeforces Round 10 D.Nested Segments
D. Nested Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n segments on a line. Ther原创 2016-03-29 16:10:49 · 277 阅读 · 0 评论 -
Educational Codeforces Round 10 C. Foe Pairs
C. Foe Pairstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p of length n. Al原创 2016-03-29 16:06:38 · 476 阅读 · 0 评论 -
Educational Codeforces Round 10 B. z-sort
B. z-sorttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA student of z-school found a kind of sorting call原创 2016-03-29 16:03:56 · 324 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2)C. Wet Shark and Flowers
C. Wet Shark and Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n sharks who grow flowers for Wet原创 2016-02-02 18:05:21 · 319 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2) B. Wet Shark and Bishops
B. Wet Shark and Bishopstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday, Wet Shark is given n bishops on a10原创 2016-02-02 17:18:02 · 414 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2) E. Wet Shark and Blocks
E. Wet Shark and Blockstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are b blocks of digits. Each原创 2016-02-01 14:04:33 · 669 阅读 · 0 评论 -
Codeforces Round #339 (Div. 2)
A. Link/Cut Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProgrammer Rostislav got seriously interes原创 2016-01-29 18:50:59 · 465 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2)D. Rat Kwesh and Cheese
D. Rat Kwesh and Cheesetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWet Shark asked Rat Kwesh to generate three positive real numbers原创 2016-02-05 12:00:00 · 428 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2) C - A Problem about Polyline
C. A Problem about Polylinetime limit per test1 secondmemory limit per test256 megabytesThere is a polyline going through points (0, 0) – (x, x) – (2x, 0) – (3x, x) – (4x, 0) – ... -原创 2015-09-17 13:20:58 · 525 阅读 · 2 评论 -
Codeforces Round #320 (Div. 2) C - A Problem about Polyline
C. A Problem about Polylinetime limit per test1 secondmemory limit per test256 megabytesThere is a polyline going through points (0, 0) – (x, x) – (2x, 0) – (3x, x) – (4x, 0) – ... -原创 2015-09-17 13:20:47 · 391 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2)D. "Or" Game(好题)
D. "Or" Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n numbers a1, a2, ..., an. You can perfo原创 2015-09-17 12:39:26 · 579 阅读 · 0 评论 -
Educational Codeforces Round 10 E.Pursuit For Artifacts
E. Pursuit For Artifactstime limit per test3 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputJohnny is playing a well-known computer game. The game are in some country原创 2016-03-29 16:13:05 · 417 阅读 · 0 评论 -
codeforces Good Bye 2015 B
B. New Year and Old Property原创 2016-03-08 08:43:13 · 353 阅读 · 0 评论 -
codeforces Good Bye 2015 E. New Year and Three Musketeers
E. New Year and Three Musketeerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDo you know the story abou原创 2016-03-08 09:17:53 · 419 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2) F. Polycarp and Hay(并查集)
F. Polycarp and Haytime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe farmer Polycarp has a warehouse wit原创 2016-04-01 14:49:40 · 613 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2) E. New Reform
E. New Reformtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland has n cities connected by m bidirectio原创 2016-04-01 14:21:18 · 619 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2) D. Bicycle Race
D. Bicycle Racetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMaria participates in a bicycle race.The原创 2016-04-01 14:04:59 · 437 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2) C.Tanya and Toys
C. Tanya and Toystime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland recently a new collection of to原创 2016-04-01 13:54:14 · 333 阅读 · 0 评论