Codeforces Round 585 (Div. 2)

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
1215 Codeforces Round 585 (Div. 2) FINISHED False 7200 163279499 Sept. 15, 2019, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6205 ) D Ticket Game PROGRAMMING games greedy math 1700

B'Monocarp and Bicarp live in Berland, where every bus ticket consists of n digits ( n is an even number). During the evening walk Monocarp and Bicarp found a ticket where some of the digits have been erased. The number of digits that have been erased is even. Monocarp and Bicarp have decided to play a game with this ticket. Monocarp hates happy tickets, while Bicarp collects them. A ticket is considered happy if the sum of the first frac{n}{2} digits of this ticket is equal to the sum of the last frac{n}{2} digits. Monocarp and Bicarp take turns (and Monocarp performs the first of them). During each turn, the current player must replace any erased digit with any digit from 0 to 9 . The game ends when there are no erased digits in the ticket. If the ticket is happy after all erased digits are replaced with decimal digits, then Bicarp wins. Otherwise, Monocarp wins. You have to determine who will win if both players play optimally. The first line contains one even integer n (2 <= n <= 2 cdot 10^{5}) -- the number of digits in the ticket. The second line contains a string of n digits and "?" characters -- the ticket which Monocarp and Bicarp have found. If the i -th character is "?", then the i -th digit is erased. Note that there may be leading zeroes. The number of "?" characters is even. If Monocarp wins, print "Monocarp" (without quotes). Otherwise print "Bicarp" (without quotes). Since there is no question mark in the ticket in the first example, the winner is determined before the game even starts, and it is Bicarp. In the second example, Bicarp also wins. After Monocarp chooses an erased digit and replaces it with a new one, Bicap can choose another position with an erased digit and replace it with the same digit, so the ticket is happy. '...

Tutorials

Codeforces Round #585 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60662868 dblark D Sept. 16, 2019, 6:08 a.m. OK FPC TESTS 96 31 1331200 1700
60677205 LaSWeeG D Sept. 16, 2019, 12:48 p.m. OK FPC TESTS 96 46 1331200 1700
60665742 aRxK D Sept. 16, 2019, 7:55 a.m. OK GNU C11 TESTS 96 31 204800 1700
60646568 Alfeh D Sept. 15, 2019, 5:22 p.m. OK GNU C11 TESTS 96 31 204800 1700
66820411 shubh101220001 D Dec. 14, 2019, 7:15 a.m. OK GNU C11 TESTS 96 46 0 1700
62033480 Li-kunyang D Oct. 7, 2019, 2:27 a.m. OK GNU C++11 TESTS 96 31 0 1700
61949378 vjudge2 D Oct. 6, 2019, 2:29 a.m. OK GNU C++11 TESTS 96 31 0 1700
61916367 Luvwgyx D Oct. 5, 2019, 12:13 p.m. OK GNU C++11 TESTS 96 31 0 1700
62537092 LuciferX07 D Oct. 13, 2019, 11:48 p.m. OK GNU C++11 TESTS 96 31 0 1700
62040895 HansLimon D Oct. 7, 2019, 5:55 a.m. OK GNU C++11 TESTS 96 31 0 1700
62036423 vjudge4 D Oct. 7, 2019, 4:02 a.m. OK GNU C++11 TESTS 96 31 0 1700
62033501 Li-kunyang D Oct. 7, 2019, 2:27 a.m. OK GNU C++11 TESTS 96 31 0 1700
62033493 vjudge2 D Oct. 7, 2019, 2:27 a.m. OK GNU C++11 TESTS 96 31 0 1700
62623673 vjudge2 D Oct. 15, 2019, 1:30 p.m. OK GNU C++11 TESTS 96 31 0 1700
62624052 vjudge4 D Oct. 15, 2019, 1:36 p.m. OK GNU C++11 TESTS 96 31 0 1700
66492358 Love_dkq_Forever D Dec. 8, 2019, 9:02 a.m. OK GNU C++14 TESTS 96 30 204800 1700
61307889 ionut_dobricean D Sept. 26, 2019, 8:05 a.m. OK GNU C++14 TESTS 96 30 204800 1700
60749758 Vectory D Sept. 18, 2019, 5:25 a.m. OK GNU C++14 TESTS 96 30 307200 1700
66455004 aphrodite_07 D Dec. 7, 2019, 12:50 p.m. OK GNU C++14 TESTS 96 30 512000 1700
60647286 proggerkz D Sept. 15, 2019, 5:39 p.m. OK GNU C++14 TESTS 96 30 512000 1700
61197832 vreaudelftpls D Sept. 24, 2019, 6:26 a.m. OK GNU C++14 TESTS 96 30 1331200 1700
68203960 Bogdan1110 D Jan. 4, 2020, 4:48 p.m. OK GNU C++14 TESTS 96 31 0 1700
69053158 ethan D Jan. 18, 2020, 1:27 p.m. OK GNU C++14 TESTS 96 31 0 1700
69052989 ethan D Jan. 18, 2020, 1:23 p.m. OK GNU C++14 TESTS 96 31 0 1700
63114667 ZetaLuLu D Oct. 22, 2019, 8:54 a.m. OK GNU C++14 TESTS 96 31 0 1700
60654058 alhiris D Sept. 15, 2019, 9:17 p.m. OK GNU C++17 TESTS 96 30 204800 1700
60657703 201732110113 D Sept. 16, 2019, 1:39 a.m. OK GNU C++17 TESTS 96 30 204800 1700
60698541 asc123 D Sept. 16, 2019, 9:20 p.m. OK GNU C++17 TESTS 96 30 512000 1700
60683667 HadyKo D Sept. 16, 2019, 2:41 p.m. OK GNU C++17 TESTS 96 30 512000 1700
61384566 mraron D Sept. 27, 2019, 6:35 p.m. OK GNU C++17 TESTS 96 30 512000 1700
60660762 jsu008 D Sept. 16, 2019, 4:37 a.m. OK GNU C++17 TESTS 96 30 1536000 1700
66092718 lijiatu D Dec. 1, 2019, 7:32 a.m. OK GNU C++17 TESTS 96 31 0 1700
69456233 sanyam2248 D Jan. 24, 2020, 8:45 a.m. OK GNU C++17 TESTS 96 31 0 1700
66403082 BryanValeriano D Dec. 6, 2019, 12:52 p.m. OK GNU C++17 TESTS 96 31 0 1700
63365007 andr0901 D Oct. 25, 2019, 7:09 a.m. OK GNU C++17 TESTS 96 31 0 1700
60687485 smtcoder D Sept. 16, 2019, 3:59 p.m. OK Go TESTS 96 46 0 1700
66245355 machhra D Dec. 3, 2019, 8:11 p.m. OK Java 11 TESTS 96 187 0 1700
64781117 1NVAL1D D Nov. 13, 2019, 7:09 a.m. OK Java 11 TESTS 96 187 0 1700
60651869 Agnimandur D Sept. 15, 2019, 7:48 p.m. OK Java 8 TESTS 96 109 0 1700
63958480 TheRaven D Nov. 1, 2019, 3:38 a.m. OK Java 8 TESTS 96 109 0 1700
60691205 jaynils D Sept. 16, 2019, 5:24 p.m. OK Java 8 TESTS 96 109 0 1700
62887829 unicorn20141 D Oct. 18, 2019, 7:05 p.m. OK Java 8 TESTS 96 124 0 1700
62861389 wretar D Oct. 18, 2019, 10:55 a.m. OK Java 8 TESTS 96 124 0 1700
62352405 ktvktv D Oct. 11, 2019, 9:47 a.m. OK Java 8 TESTS 96 124 0 1700
62333226 icpc_loser D Oct. 10, 2019, 10:15 p.m. OK Java 8 TESTS 96 124 0 1700
61602004 instant_crush D Oct. 1, 2019, 11:22 a.m. OK Java 8 TESTS 96 124 0 1700
61561358 yaoct D Sept. 30, 2019, 3:40 p.m. OK Java 8 TESTS 96 124 0 1700
61218504 shaurya_singh D Sept. 24, 2019, 1:21 p.m. OK Java 8 TESTS 96 124 0 1700
60662478 sjx233 D Sept. 16, 2019, 5:55 a.m. OK JavaScript TESTS 96 93 11878400 1700
60630755 sjx233 D Sept. 15, 2019, 12:17 p.m. OK JavaScript TESTS 96 108 12083200 1700
60706361 Spheniscine D Sept. 17, 2019, 5:29 a.m. OK Kotlin TESTS 96 124 0 1700
60628742 pavlo.liapota D Sept. 15, 2019, 12:05 p.m. OK Kotlin TESTS 96 156 0 1700
61844209 og.kostya D Oct. 4, 2019, 10:48 a.m. OK Mono C# TESTS 96 46 819200 1700
60662458 omikad D Sept. 16, 2019, 5:54 a.m. OK Mono C# TESTS 96 62 716800 1700
60632357 plasma-effect D Sept. 15, 2019, 12:26 p.m. OK Mono C# TESTS 96 62 4403200 1700
62659134 vjudge4 D Oct. 16, 2019, 4:26 a.m. OK MS C++ TESTS 96 31 204800 1700
62621213 vjudge4 D Oct. 15, 2019, 12:54 p.m. OK MS C++ TESTS 96 31 204800 1700
62598539 vjudge5 D Oct. 15, 2019, 3:49 a.m. OK MS C++ TESTS 96 31 204800 1700
62597825 vjudge5 D Oct. 15, 2019, 3:16 a.m. OK MS C++ TESTS 96 31 204800 1700
61949430 vjudge4 D Oct. 6, 2019, 2:31 a.m. OK MS C++ TESTS 96 31 204800 1700
61949404 vjudge1 D Oct. 6, 2019, 2:30 a.m. OK MS C++ TESTS 96 31 204800 1700
61010841 vjudge2 D Sept. 21, 2019, 12:12 p.m. OK MS C++ TESTS 96 31 204800 1700
60965352 vjudge2 D Sept. 21, 2019, 6:50 a.m. OK MS C++ TESTS 96 31 204800 1700
60964050 vjudge4 D Sept. 21, 2019, 6:26 a.m. OK MS C++ TESTS 96 31 204800 1700
60963997 vjudge3 D Sept. 21, 2019, 6:25 a.m. OK MS C++ TESTS 96 31 204800 1700
60719840 pmitkov D Sept. 17, 2019, 12:02 p.m. OK MS C++ 2017 TESTS 96 31 204800 1700
61205591 rqrqrqrqrq D Sept. 24, 2019, 9:30 a.m. OK MS C++ 2017 TESTS 96 31 204800 1700
60668722 cjhxqdt D Sept. 16, 2019, 9:34 a.m. OK MS C++ 2017 TESTS 96 31 204800 1700
60656047 VagrantAC D Sept. 15, 2019, 11:39 p.m. OK MS C++ 2017 TESTS 96 31 204800 1700
61856055 nacl_jht D Oct. 4, 2019, 2:07 p.m. OK MS C++ 2017 TESTS 96 31 204800 1700
63100270 YHHxBULIATANIA D Oct. 21, 2019, 11:43 p.m. OK MS C++ 2017 TESTS 96 31 204800 1700
65152985 vjudge3 D Nov. 16, 2019, 8:16 a.m. OK MS C++ 2017 TESTS 96 31 204800 1700
60645005 j2v D Sept. 15, 2019, 4:46 p.m. OK MS C++ 2017 TESTS 96 31 409600 1700
60622799 youx D Sept. 15, 2019, 11:33 a.m. OK MS C++ 2017 TESTS 96 31 409600 1700
63874197 kurs D Oct. 30, 2019, 6:26 p.m. OK MS C++ 2017 TESTS 96 31 614400 1700
60685090 vippee D Sept. 16, 2019, 3:08 p.m. OK PascalABC.NET TESTS 96 218 0 1700
60624159 zdbtxdy D Sept. 15, 2019, 11:40 a.m. OK PyPy 2 TESTS 96 140 819200 1700
66639562 yumtam D Dec. 11, 2019, 2:12 p.m. OK PyPy 2 TESTS 96 155 1638400 1700
60739167 shehebe D Sept. 17, 2019, 6:59 p.m. OK PyPy 2 TESTS 96 155 2048000 1700
60618961 alexwice D Sept. 15, 2019, 11:14 a.m. OK PyPy 2 TESTS 96 155 6963200 1700
60684111 Yordan_Iliev D Sept. 16, 2019, 2:50 p.m. OK PyPy 3 TESTS 96 155 2560000 1700
65303475 irza_law D Nov. 18, 2019, 2:04 p.m. OK PyPy 3 TESTS 96 156 2969600 1700
61886018 dgjjkycg D Oct. 5, 2019, 3:30 a.m. OK PyPy 3 TESTS 96 171 2662400 1700
60628982 Kirillov_Alexey D Sept. 15, 2019, 12:07 p.m. OK PyPy 3 TESTS 96 171 2867200 1700
61382385 BenL D Sept. 27, 2019, 5:53 p.m. OK PyPy 3 TESTS 96 171 2867200 1700
60667376 D_J_Z D Sept. 16, 2019, 8:51 a.m. OK PyPy 3 TESTS 96 171 2969600 1700
60649952 neterukun D Sept. 15, 2019, 6:46 p.m. OK PyPy 3 TESTS 96 171 2969600 1700
60649629 neterukun D Sept. 15, 2019, 6:35 p.m. OK PyPy 3 TESTS 96 171 2969600 1700
60649592 neterukun D Sept. 15, 2019, 6:34 p.m. OK PyPy 3 TESTS 96 171 2969600 1700
61082786 sai.comgoin D Sept. 22, 2019, 5:03 p.m. OK PyPy 3 TESTS 96 171 3072000 1700
60618496 nwi D Sept. 15, 2019, 11:12 a.m. OK Python 2 TESTS 96 233 614400 1700
60627861 dmikhalin D Sept. 15, 2019, noon OK Python 3 TESTS 96 171 409600 1700
60630853 AYena D Sept. 15, 2019, 12:18 p.m. OK Python 3 TESTS 96 186 409600 1700
60778173 PhilTheFish hops378 Soapen D Sept. 18, 2019, 3:13 p.m. OK Python 3 TESTS 96 186 716800 1700
62781197 saumyag.gupta ShashankGoel.IITD Thishandleiscurrent D Oct. 17, 2019, 12:58 p.m. OK Python 3 TESTS 96 186 1228800 1700
61973925 Savit_Gupta D Oct. 6, 2019, 9:56 a.m. OK Python 3 TESTS 96 202 409600 1700
60642217 PanZverski D Sept. 15, 2019, 3:48 p.m. OK Python 3 TESTS 96 202 409600 1700
60778076 PhilTheFish hops378 Soapen D Sept. 18, 2019, 3:11 p.m. OK Python 3 TESTS 96 202 716800 1700
61063437 Katushechka D Sept. 22, 2019, 10:13 a.m. OK Python 3 TESTS 96 217 409600 1700
60633395 Gegege337 D Sept. 15, 2019, 12:32 p.m. OK Python 3 TESTS 96 217 409600 1700
64478175 vjudge5 D Nov. 7, 2019, 3:03 p.m. OK Python 3 TESTS 96 217 3379200 1700
60632782 REVU D Sept. 15, 2019, 12:29 p.m. OK Ruby TESTS 96 202 17612800 1700
60639525 sansen D Sept. 15, 2019, 3:01 p.m. OK Rust TESTS 96 46 1945600 1700
60626393 yudedako D Sept. 15, 2019, 11:52 a.m. OK Scala TESTS 96 514 0 1700

remove filters

Back to search problems