Codeforces Global Round 5

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
1237 Codeforces Global Round 5 FINISHED False 9000 160586699 Oct. 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20050 ) A Balanced Rating Changes PROGRAMMING implementation math 1100

B'Another Codeforces Round has just finished! It has gathered n participants, and according to the results, the expected rating change of participant i is a_i . These rating changes are perfectly balanced -- their sum is equal to 0 . Unfortunately, due to minor technical glitches, the round is declared semi-rated. It means that all rating changes must be divided by two. There are two conditions though: Can you help with that? The first line contains a single integer n ( 2 <= n <= 13 ,845 ), denoting the number of participants. Each of the next n lines contains a single integer a_i ( -336 <= a_i <= 1164 ), denoting the rating change of the i -th participant. The sum of all a_i is equal to 0 . Output n integers b_i , each denoting the modified rating change of the i -th participant in order of input. For any i , it must be true that either b_i = lfloor frac{a_i}{2} rfloor or b_i = lceil frac{a_i}{2} rceil . The sum of all b_i must be equal to 0 . If there are multiple solutions, print any. We can show that a solution exists for any valid input. In the first example, b_1 = 5 , b_2 = -3 and b_3 = -2 is another correct solution. In the second example there are 6 possible solutions, one of them is shown in the example output. '...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66897607 diegorestrepo68 A Dec. 15, 2019, 3:06 a.m. OK Clang++17 Diagnostics TESTS 38 109 102400 1100
66549218 1942938446 A Dec. 9, 2019, 2:15 p.m. OK FPC TESTS 38 62 204800 1100
63493236 calonmaster A Oct. 26, 2019, 2:52 p.m. OK FPC TESTS 38 62 409600 1100
62765898 weng_233 A Oct. 17, 2019, 8:37 a.m. OK FPC TESTS 38 77 0 1100
62710971 melery_kin A Oct. 16, 2019, 3:37 p.m. OK FPC TESTS 38 77 0 1100
62710932 Just_Matvey A Oct. 16, 2019, 3:37 p.m. OK FPC TESTS 38 77 102400 1100
62705263 mr.saylander A Oct. 16, 2019, 3:19 p.m. OK FPC TESTS 38 93 102400 1100
63164057 Learn4Fun A Oct. 22, 2019, 3:44 p.m. OK FPC TESTS 38 109 102400 1100
69070642 ndaidemf A Jan. 18, 2020, 9:32 p.m. OK GNU C11 TESTS 38 31 0 1100
67420322 satya_chaitanya A Dec. 22, 2019, 11:25 a.m. OK GNU C11 TESTS 38 62 0 1100
62736445 rainboy A Oct. 16, 2019, 6:29 p.m. OK GNU C11 TESTS 38 62 0 1100
62777495 siva2000 A Oct. 17, 2019, 12:05 p.m. OK GNU C11 TESTS 38 62 0 1100
62883584 skk_18 A Oct. 18, 2019, 5:36 p.m. OK GNU C11 TESTS 38 62 0 1100
62904984 shimul_duet A Oct. 19, 2019, 5:32 a.m. OK GNU C11 TESTS 38 62 0 1100
62910462 stco__ A Oct. 19, 2019, 7:09 a.m. OK GNU C11 TESTS 38 62 0 1100
63505858 Tube_light_43 A Oct. 26, 2019, 6:41 p.m. OK GNU C11 TESTS 38 62 0 1100
63924380 tour0149 A Oct. 31, 2019, 12:38 p.m. OK GNU C11 TESTS 38 62 0 1100
68201608 mohana-256 A Jan. 4, 2020, 4:06 p.m. OK GNU C11 TESTS 38 62 0 1100
62760266 gsyz A Oct. 17, 2019, 6:36 a.m. OK GNU C++11 TESTS 38 30 0 1100
68594918 vjudge1 A Jan. 11, 2020, 1:45 p.m. OK GNU C++11 TESTS 38 30 102400 1100
62705365 upc132 A Oct. 16, 2019, 3:19 p.m. OK GNU C++11 TESTS 38 30 2457600 1100
65487612 r4in A Nov. 21, 2019, 1:37 p.m. OK GNU C++11 TESTS 38 31 0 1100
66136066 vjudge1 A Dec. 1, 2019, 12:16 p.m. OK GNU C++11 TESTS 38 31 0 1100
66136234 Karry5307 A Dec. 1, 2019, 12:20 p.m. OK GNU C++11 TESTS 38 31 0 1100
67157359 g3s A Dec. 18, 2019, 12:54 p.m. OK GNU C++11 TESTS 38 31 0 1100
68022855 xyjw A Jan. 1, 2020, 2 a.m. OK GNU C++11 TESTS 38 31 0 1100
64556200 Pyqe A Nov. 9, 2019, 3:53 a.m. OK GNU C++11 TESTS 38 31 0 1100
64517305 CQUzbx A Nov. 8, 2019, 11:11 a.m. OK GNU C++11 TESTS 38 31 0 1100
62773230 BestMSN A Oct. 17, 2019, 10:59 a.m. OK GNU C++14 TESTS 38 15 0 1100
68113358 Luzivanlt A Jan. 3, 2020, 10:27 a.m. OK GNU C++14 TESTS 38 15 102400 1100
62760088 UP_ENDER A Oct. 17, 2019, 6:33 a.m. OK GNU C++14 TESTS 38 15 204800 1100
62748842 Mari000 A Oct. 16, 2019, 11:37 p.m. OK GNU C++14 TESTS 38 30 0 1100
62749483 angrysqrt3 A Oct. 17, 2019, 12:07 a.m. OK GNU C++14 TESTS 38 30 0 1100
62739262 alvinvaja A Oct. 16, 2019, 7:14 p.m. OK GNU C++14 TESTS 38 30 0 1100
63254333 knakul_853 A Oct. 23, 2019, 5:03 p.m. OK GNU C++14 TESTS 38 30 0 1100
63535986 yukke714 A Oct. 27, 2019, 8:05 a.m. OK GNU C++14 TESTS 38 30 0 1100
64733254 _H_I_ A Nov. 12, 2019, 9:14 a.m. OK GNU C++14 TESTS 38 30 0 1100
69425666 Swarn10 A Jan. 23, 2020, 3:43 p.m. OK GNU C++14 TESTS 38 30 102400 1100
67032262 _sad_ A Dec. 16, 2019, 4:13 p.m. OK GNU C++17 TESTS 38 15 0 1100
62736899 teapotd A Oct. 16, 2019, 6:36 p.m. OK GNU C++17 TESTS 38 15 102400 1100
66529228 Mostafa_TaLat A Dec. 9, 2019, 6:52 a.m. OK GNU C++17 TESTS 38 15 204800 1100
62762614 kumarpritam863 A Oct. 17, 2019, 7:26 a.m. OK GNU C++17 TESTS 38 15 307200 1100
62756288 nitesh_gupta A Oct. 17, 2019, 4:52 a.m. OK GNU C++17 TESTS 38 15 1638400 1100
62754964 Lordxx A Oct. 17, 2019, 4:02 a.m. OK GNU C++17 TESTS 38 15 3993600 1100
62745834 reversebladesamurai A Oct. 16, 2019, 9:34 p.m. OK GNU C++17 TESTS 38 15 24064000 1100
67860362 CanisMajor A Dec. 29, 2019, 7:57 a.m. OK GNU C++17 TESTS 38 30 0 1100
67866437 I_will_not_quit A Dec. 29, 2019, 9:51 a.m. OK GNU C++17 TESTS 38 30 0 1100
69078828 ZhuZiyi A Jan. 19, 2020, 5:18 a.m. OK GNU C++17 TESTS 38 30 0 1100
63131636 reanimatorzon A Oct. 22, 2019, 2:25 p.m. OK Go TESTS 38 31 0 1100
62742070 synapse A Oct. 16, 2019, 8:07 p.m. OK Go TESTS 38 31 0 1100
62754874 cojna A Oct. 17, 2019, 3:57 a.m. OK Haskell TESTS 38 31 102400 1100
67256074 lightseba A Dec. 19, 2019, 10:20 p.m. OK Java 11 TESTS 38 186 0 1100
63487805 M2lkhalifah A Oct. 26, 2019, 1:52 p.m. OK Java 11 TESTS 38 186 0 1100
68327365 noobie_code A Jan. 6, 2020, 5:23 p.m. OK Java 11 TESTS 38 312 102400 1100
63949379 Hack_Elite A Oct. 31, 2019, 8:21 p.m. OK Java 11 TESTS 38 312 204800 1100
64531330 minionsRahat A Nov. 8, 2019, 3:32 p.m. OK Java 11 TESTS 38 326 102400 1100
69897022 Pro_Heaper A Jan. 31, 2020, 12:02 p.m. OK Java 11 TESTS 38 342 204800 1100
69607945 aneri A Jan. 27, 2020, 10:26 a.m. OK Java 11 TESTS 38 343 102400 1100
68888573 abdalla00000 A Jan. 16, 2020, 12:23 a.m. OK Java 11 TESTS 38 343 102400 1100
66975740 yash49 A Dec. 15, 2019, 2:38 p.m. OK Java 11 TESTS 38 343 102400 1100
66388809 pmlalpurwala A Dec. 6, 2019, 8:26 a.m. OK Java 11 TESTS 38 343 204800 1100
63024300 NormalGeek A Oct. 20, 2019, 3:43 p.m. OK Java 8 TESTS 38 109 0 1100
62741387 akman10 A Oct. 16, 2019, 7:54 p.m. OK Java 8 TESTS 38 109 0 1100
62739101 bking11 A Oct. 16, 2019, 7:12 p.m. OK Java 8 TESTS 38 109 0 1100
67785155 vjvjain0 A Dec. 28, 2019, 12:28 p.m. OK Java 8 TESTS 38 124 0 1100
67776715 igor_kz A Dec. 28, 2019, 9:16 a.m. OK Java 8 TESTS 38 124 0 1100
65164272 GreatWhite A Nov. 16, 2019, 12:39 p.m. OK Java 8 TESTS 38 124 0 1100
64569817 PlatinumDisco A Nov. 9, 2019, 8:48 a.m. OK Java 8 TESTS 38 124 0 1100
63487930 M2lkhalifah A Oct. 26, 2019, 1:55 p.m. OK Java 8 TESTS 38 124 0 1100
63410718 the41 A Oct. 25, 2019, 11:57 p.m. OK Java 8 TESTS 38 124 0 1100
63406422 Mann_27__ A Oct. 25, 2019, 8:39 p.m. OK Java 8 TESTS 38 124 0 1100
62719243 UnresolvedCold A Oct. 16, 2019, 4:09 p.m. OK JavaScript TESTS 38 93 2457600 1100
62820641 nuralamcse024 A Oct. 17, 2019, 4:41 p.m. OK JavaScript TESTS 38 139 2662400 1100
65300390 kokokochet A Nov. 18, 2019, 1:02 p.m. OK Kotlin TESTS 38 124 0 1100
62754064 Spheniscine A Oct. 17, 2019, 3:25 a.m. OK Kotlin TESTS 38 140 0 1100
63346917 mirennn A Oct. 24, 2019, 7:41 p.m. OK Kotlin TESTS 38 248 102400 1100
62836054 darnley A Oct. 17, 2019, 10:34 p.m. OK Kotlin TESTS 38 249 102400 1100
62736596 Ahmadjon A Oct. 16, 2019, 6:31 p.m. OK Kotlin TESTS 38 249 102400 1100
62734943 SeD A Oct. 16, 2019, 6:12 p.m. OK Kotlin TESTS 38 264 204800 1100
62704210 darnley A Oct. 16, 2019, 3:16 p.m. OK Kotlin TESTS 38 265 102400 1100
62756225 omikad A Oct. 17, 2019, 4:50 a.m. OK Mono C# TESTS 38 62 1536000 1100
63646594 hyzhangzhy A Oct. 28, 2019, 9:56 a.m. OK Mono C# TESTS 38 93 1024000 1100
64796124 Balloon_Master A Nov. 13, 2019, 12:57 p.m. OK Mono C# TESTS 38 124 614400 1100
62908744 mayumi A Oct. 19, 2019, 6:39 a.m. OK Mono C# TESTS 38 139 614400 1100
62710048 FeelNoReGret A Oct. 16, 2019, 3:34 p.m. OK Mono C# TESTS 38 139 716800 1100
63265562 Equbuxu A Oct. 23, 2019, 11:38 p.m. OK Mono C# TESTS 38 139 819200 1100
62759090 nadilk A Oct. 17, 2019, 6:09 a.m. OK Mono C# TESTS 38 140 512000 1100
62762356 ansergeyg A Oct. 17, 2019, 7:20 a.m. OK Mono C# TESTS 38 140 512000 1100
62909069 nastya1199 A Oct. 19, 2019, 6:45 a.m. OK Mono C# TESTS 38 140 512000 1100
62739678 1champ10n A Oct. 16, 2019, 7:21 p.m. OK Mono C# TESTS 38 140 512000 1100
64075881 vjudge2 A Nov. 2, 2019, 8:46 a.m. OK MS C++ TESTS 38 31 0 1100
62720095 njqchong A Oct. 16, 2019, 4:12 p.m. OK MS C++ TESTS 38 31 0 1100
64872448 vjudge5 A Nov. 14, 2019, 8:39 a.m. OK MS C++ TESTS 38 31 0 1100
68894796 vjudge5 A Jan. 16, 2020, 4 a.m. OK MS C++ TESTS 38 31 102400 1100
62704587 _Neuromancer_ A Oct. 16, 2019, 3:17 p.m. OK MS C++ TESTS 38 31 102400 1100
68581468 vjudge2 A Jan. 11, 2020, 10:12 a.m. OK MS C++ TESTS 38 31 102400 1100
68641017 vjudge2 A Jan. 12, 2020, 7:31 a.m. OK MS C++ TESTS 38 31 204800 1100
62746446 wajdijammoul4 A Oct. 16, 2019, 9:54 p.m. OK MS C++ TESTS 38 46 0 1100
65404018 vjudge1 A Nov. 20, 2019, 1:41 a.m. OK MS C++ TESTS 38 46 102400 1100
64791449 vjudge4 A Nov. 13, 2019, 11:21 a.m. OK MS C++ TESTS 38 46 102400 1100
62774189 ChaLemon A Oct. 17, 2019, 11:15 a.m. OK MS C++ 2017 TESTS 38 31 0 1100
62780931 ruolanlan A Oct. 17, 2019, 12:53 p.m. OK MS C++ 2017 TESTS 38 31 0 1100
68641283 vjudge3 A Jan. 12, 2020, 7:36 a.m. OK MS C++ 2017 TESTS 38 31 102400 1100
63645770 walqshwq A Oct. 28, 2019, 9:37 a.m. OK MS C++ 2017 TESTS 38 31 102400 1100
62753094 return-zan A Oct. 17, 2019, 2:48 a.m. OK MS C++ 2017 TESTS 38 31 102400 1100
62741177 pmitkov A Oct. 16, 2019, 7:49 p.m. OK MS C++ 2017 TESTS 38 31 102400 1100
64290453 dundae A Nov. 5, 2019, 6:48 a.m. OK MS C++ 2017 TESTS 38 31 102400 1100
62710706 P___ A Oct. 16, 2019, 3:36 p.m. OK MS C++ 2017 TESTS 38 31 307200 1100
69222563 vjudge4 A Jan. 21, 2020, 5:33 a.m. OK MS C++ 2017 TESTS 38 31 819200 1100
63435458 codex27 A Oct. 26, 2019, 10:31 a.m. OK MS C++ 2017 TESTS 38 31 1228800 1100
62713329 SuccumbToSuccess A Oct. 16, 2019, 3:45 p.m. OK Node.js TESTS 38 171 4710400 1100
62709646 JohnRey A Oct. 16, 2019, 3:32 p.m. OK Node.js TESTS 38 358 10649600 1100
63089976 shivam1420 A Oct. 21, 2019, 6:01 p.m. OK Node.js TESTS 38 374 10956800 1100
62738394 GoodFoxy A Oct. 16, 2019, 6:59 p.m. OK Ocaml TESTS 38 62 102400 1100
62736848 PAG A Oct. 16, 2019, 6:35 p.m. OK PascalABC.NET TESTS 38 592 204800 1100
62914930 Nbvcxz A Oct. 19, 2019, 8:25 a.m. OK PascalABC.NET TESTS 38 592 307200 1100
62707147 vladsto A Oct. 16, 2019, 3:24 p.m. OK PascalABC.NET TESTS 38 608 204800 1100
62708922 Dmitryyy A Oct. 16, 2019, 3:30 p.m. OK PascalABC.NET TESTS 38 623 204800 1100
62709315 semidol A Oct. 16, 2019, 3:31 p.m. OK PascalABC.NET TESTS 38 624 102400 1100
62706473 rsFalse A Oct. 16, 2019, 3:22 p.m. OK Perl TESTS 38 46 2252800 1100
64532585 mayakin A Nov. 8, 2019, 3:54 p.m. OK PHP TESTS 38 77 409600 1100
62735784 injust A Oct. 16, 2019, 6:20 p.m. OK PyPy 2 TESTS 38 296 3891200 1100
62735856 injust A Oct. 16, 2019, 6:21 p.m. OK PyPy 2 TESTS 38 311 3891200 1100
62735311 realnimish A Oct. 16, 2019, 6:15 p.m. OK PyPy 2 TESTS 38 390 8294400 1100
62720718 jolt.tks A Oct. 16, 2019, 4:15 p.m. OK PyPy 2 TESTS 38 577 8396800 1100
64624438 pranaymalhan1 A Nov. 10, 2019, 8:05 a.m. OK PyPy 3 TESTS 38 186 5222400 1100
62762468 socha A Oct. 17, 2019, 7:23 a.m. OK PyPy 3 TESTS 38 186 5427200 1100
62744594 Stephan A Oct. 16, 2019, 9:01 p.m. OK PyPy 3 TESTS 38 187 6553600 1100
62714210 FireBird23 A Oct. 16, 2019, 3:49 p.m. OK PyPy 3 TESTS 38 202 4608000 1100
62732181 thecodearrow A Oct. 16, 2019, 5:04 p.m. OK PyPy 3 TESTS 38 202 6041600 1100
65734266 ng24_7 A Nov. 26, 2019, 6:56 a.m. OK PyPy 3 TESTS 38 202 6553600 1100
62756408 shanu_im A Oct. 17, 2019, 4:56 a.m. OK PyPy 3 TESTS 38 265 5632000 1100
62773060 FireBird23 A Oct. 17, 2019, 10:56 a.m. OK PyPy 3 TESTS 38 280 5427200 1100
62711154 Joggor A Oct. 16, 2019, 3:37 p.m. OK PyPy 3 TESTS 38 280 5529600 1100
63032874 petko1998 A Oct. 20, 2019, 7:15 p.m. OK PyPy 3 TESTS 38 280 6144000 1100
62833587 elistark A Oct. 17, 2019, 8:57 p.m. OK Python 2 TESTS 38 186 512000 1100
62738344 pktyagi1 A Oct. 16, 2019, 6:59 p.m. OK Python 2 TESTS 38 187 409600 1100
62738564 julio.biel A Oct. 16, 2019, 7:02 p.m. OK Python 2 TESTS 38 202 307200 1100
62822566 elistark A Oct. 17, 2019, 5:06 p.m. OK Python 2 TESTS 38 202 512000 1100
62718202 syed.al.mahi A Oct. 16, 2019, 4:04 p.m. OK Python 2 TESTS 38 202 512000 1100
62858120 Madhur1906 A Oct. 18, 2019, 9:57 a.m. OK Python 2 TESTS 38 248 614400 1100
62735413 eugalt A Oct. 16, 2019, 6:16 p.m. OK Python 2 TESTS 38 249 307200 1100
62734928 shubhankarsharma00 A Oct. 16, 2019, 6:12 p.m. OK Python 2 TESTS 38 249 716800 1100
62712281 geasszero A Oct. 16, 2019, 3:42 p.m. OK Python 2 TESTS 38 265 921600 1100
62918993 ankit_SM A Oct. 19, 2019, 9:29 a.m. OK Python 2 TESTS 38 280 921600 1100
62738916 Cloverr_ A Oct. 16, 2019, 7:08 p.m. OK Python 3 TESTS 38 124 716800 1100
62737163 Cloverr_ A Oct. 16, 2019, 6:39 p.m. OK Python 3 TESTS 38 124 716800 1100
62757428 orailly A Oct. 17, 2019, 5:25 a.m. OK Python 3 TESTS 38 124 819200 1100
67980161 erickjohnross A Dec. 30, 2019, 6:49 p.m. OK Python 3 TESTS 38 124 1024000 1100
62736304 Cloverr_ A Oct. 16, 2019, 6:27 p.m. OK Python 3 TESTS 38 124 1024000 1100
62754164 bergus A Oct. 17, 2019, 3:29 a.m. OK Python 3 TESTS 38 124 1126400 1100
62759924 Code_Bear A Oct. 17, 2019, 6:29 a.m. OK Python 3 TESTS 38 139 1228800 1100
68090691 sureshsinghspd A Jan. 2, 2020, 6:02 p.m. OK Python 3 TESTS 38 140 409600 1100
68063404 nealzane A Jan. 2, 2020, 6:07 a.m. OK Python 3 TESTS 38 140 409600 1100
62707695 DraGoND A Oct. 16, 2019, 3:26 p.m. OK Python 3 TESTS 38 140 512000 1100
67966543 gearjack A Dec. 30, 2019, 1:32 p.m. OK Rust TESTS 38 31 409600 1100
62706979 bqn A Oct. 16, 2019, 3:24 p.m. OK Rust TESTS 38 170 409600 1100
62711009 Dawer A Oct. 16, 2019, 3:37 p.m. OK Rust TESTS 38 171 0 1100
62958715 WillToPower A Oct. 19, 2019, 10:09 p.m. OK Rust TESTS 38 171 102400 1100
67472988 manta1130 A Dec. 23, 2019, 1:25 p.m. OK Rust TESTS 38 171 204800 1100
63269588 gu_castle A Oct. 24, 2019, 3:05 a.m. OK Rust TESTS 38 202 102400 1100

remove filters

Back to search problems