Codeforces Global Round 10

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1392 Codeforces Global Round 10 FINISHED False 10800 139591463 Aug. 16, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 521 ) G Omkar and Pies PROGRAMMING bitmasks dfs and similar dp math

B"Omkar has a pie tray with k ( 2 <= q k <= q 20 ) spots. Each spot in the tray contains either a chocolate pie or a pumpkin pie. However, Omkar does not like the way that the pies are currently arranged, and has another ideal arrangement that he would prefer instead. To assist Omkar, n elves have gathered in a line to swap the pies in Omkar's tray. The j -th elf from the left is able to swap the pies at positions a_j and b_j in the tray. In order to get as close to his ideal arrangement as possible, Omkar may choose a contiguous subsegment of the elves and then pass his pie tray through the subsegment starting from the left. However, since the elves have gone to so much effort to gather in a line, they request that Omkar's chosen segment contain at least m ( 1 <= q m <= q n ) elves. Formally, Omkar may choose two integers l and r satisfying 1 <= q l <= q r <= q n and r - l + 1 geq m so that first the pies in positions a_l and b_l will be swapped, then the pies in positions a_{l + 1} and b_{l + 1} will be swapped, etc. until finally the pies in positions a_r and b_r are swapped. Help Omkar choose a segment of elves such that the amount of positions in Omkar's final arrangement that contain the same type of pie as in his ideal arrangement is the maximum possible. Note that since Omkar has a big imagination, it might be that the amounts of each type of pie in his original arrangement and in his ideal arrangement do not match. The first line contains three integers n , m , and k ( 1 <= q m <= q n <= q 10^6 and 2 <= q k <= q 20 ) -- the number of elves, the minimum subsegment length, and the number of spots in Omkar's tray respectively. The second and third lines each contain a string of length k consisting of 0 s and 1 s that represent initial arrangement of pies and ideal arrangement of pies; the j -th chara"...

Tutorials

Codeforces Global Round 10 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
91061591 WaluntOvO G Aug. 26, 2020, 2:20 p.m. OK GNU C++11 TESTS 81 187 28057600
91454000 froggyzhang G Aug. 31, 2020, 4:14 a.m. OK GNU C++11 TESTS 81 202 12288000
91061458 WaluntOvO G Aug. 26, 2020, 2:18 p.m. OK GNU C++11 TESTS 81 234 28057600
90491465 frodakcin G Aug. 20, 2020, 7:11 p.m. OK GNU C++11 TESTS 81 327 108339200
91007757 dqa2020 G Aug. 26, 2020, 12:25 a.m. OK GNU C++11 TESTS 81 358 100454400
90461672 Iscream2001 G Aug. 20, 2020, 12:26 p.m. OK GNU C++11 TESTS 81 374 12595200
90664262 RainAir G Aug. 22, 2020, 7:16 a.m. OK GNU C++11 TESTS 81 389 28364800
91571964 Asriel_Dreemurr G Sept. 1, 2020, 2:03 p.m. OK GNU C++11 TESTS 81 404 25190400
91707159 BigBag G Sept. 3, 2020, 10:13 a.m. OK GNU C++11 TESTS 81 405 117043200
90298429 TrivialMan G Aug. 18, 2020, 10:28 a.m. OK GNU C++11 TESTS 81 436 17100800
90900345 shiliangzhi G Aug. 25, 2020, 12:49 p.m. OK GNU C++14 TESTS 81 499 16793600
90378726 Quang G Aug. 19, 2020, 10:18 a.m. OK GNU C++14 TESTS 81 561 16384000
90724414 Aaeria G Aug. 23, 2020, 3:12 a.m. OK GNU C++14 TESTS 81 592 12185600
90724276 Aaeria G Aug. 23, 2020, 3:08 a.m. OK GNU C++14 TESTS 81 592 12185600
90724339 Aaeria G Aug. 23, 2020, 3:09 a.m. OK GNU C++14 TESTS 81 607 12185600
90724249 Aaeria G Aug. 23, 2020, 3:06 a.m. OK GNU C++14 TESTS 81 607 12185600
90878292 oipotato G Aug. 25, 2020, 7:33 a.m. OK GNU C++14 TESTS 81 794 13926400
90464099 AghaTizi G Aug. 20, 2020, 1 p.m. OK GNU C++14 TESTS 81 951 139264000
90345878 Alex_Savitskiy G Aug. 18, 2020, 9:54 p.m. OK GNU C++14 TESTS 81 1091 8396800
91261654 ZZZZZZZZZZZZZZZZZZ G Aug. 29, 2020, 6:38 a.m. OK GNU C++14 TESTS 81 1091 117145600
90886971 Devil_G G Aug. 25, 2020, 9:36 a.m. OK GNU C++17 TESTS 81 390 16691200
90491954 RUSH_D_CAT G Aug. 20, 2020, 7:22 p.m. OK GNU C++17 TESTS 81 436 18432000
90528372 -skyline- G Aug. 21, 2020, 11:49 a.m. OK GNU C++17 TESTS 81 451 24166400
90519655 LightYear G Aug. 21, 2020, 9:33 a.m. OK GNU C++17 TESTS 81 499 12185600
91576474 vipjml G Sept. 1, 2020, 2:55 p.m. OK GNU C++17 TESTS 81 514 16486400
90790238 SHZhang2 G Aug. 24, 2020, 2:07 a.m. OK GNU C++17 TESTS 81 530 112947200
90510373 Ali.Kh G Aug. 21, 2020, 7:27 a.m. OK GNU C++17 TESTS 81 561 12083200
90521258 Shayan.P G Aug. 21, 2020, 9:58 a.m. OK GNU C++17 TESTS 81 561 36556800
90865346 Jayce132 G Aug. 25, 2020, 3:44 a.m. OK GNU C++17 TESTS 81 561 51712000
90448049 _LeMur_ G Aug. 20, 2020, 8:56 a.m. OK GNU C++17 TESTS 81 576 16793600
90707938 neal G Aug. 22, 2020, 5:37 p.m. OK GNU C++17 (64) TESTS 81 311 12697600
90391010 FlowerOfSorrow G Aug. 19, 2020, 1:13 p.m. OK GNU C++17 (64) TESTS 81 327 16486400
90405430 sigma425 G Aug. 19, 2020, 4:12 p.m. OK GNU C++17 (64) TESTS 81 327 25907200
90707517 neal G Aug. 22, 2020, 5:30 p.m. OK GNU C++17 (64) TESTS 81 327 28774400
90385587 errorgorn G Aug. 19, 2020, 11:57 a.m. OK GNU C++17 (64) TESTS 81 374 8396800
90385541 errorgorn G Aug. 19, 2020, 11:57 a.m. OK GNU C++17 (64) TESTS 81 374 8396800
91532469 KevinWan G Sept. 1, 2020, 3:01 a.m. OK GNU C++17 (64) TESTS 81 374 109568000
90648941 yamate11 G Aug. 22, 2020, 3:15 a.m. OK GNU C++17 (64) TESTS 81 420 37171200
91444327 LiChenKoh G Aug. 30, 2020, 11:51 p.m. OK GNU C++17 (64) TESTS 81 421 24985600
90650923 yamate11 G Aug. 22, 2020, 3:57 a.m. OK GNU C++17 (64) TESTS 81 421 37171200
90343667 mphillotry G Aug. 18, 2020, 8:39 p.m. OK Java 11 TESTS 81 1060 140185600
90391641 cwise G Aug. 19, 2020, 1:22 p.m. OK Java 8 TESTS 81 623 46796800
90421235 polyakoff G Aug. 19, 2020, 9:30 p.m. OK Java 8 TESTS 81 1076 74137600

remove filters

Back to search problems