Codeforces Global Round 20

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
1672 Codeforces Global Round 20 FINISHED False 10800 86543662 April 23, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16260 ) A Log Chopping PROGRAMMING constructive algorithms games implementation math 800

B'There are n logs, the i -th log has a length of a_i meters. Since chopping logs is tiring work, errorgorn and maomao90 have decided to play a game. errorgorn and maomao90 will take turns chopping the logs with errorgorn chopping first. On his turn, the player will pick a log and chop it into 2 pieces. If the length of the chosen log is x , and the lengths of the resulting pieces are y and z , then y and z have to be positive integers, and x=y+z must hold. For example, you can chop a log of length 3 into logs of lengths 2 and 1 , but not into logs of lengths 3 and 0 , 2 and 2 , or 1.5 and 1.5 . The player who is unable to make a chop will be the loser. Assuming that both errorgorn and maomao90 play optimally, who will be the winner? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 50 ) -- the number of logs. The second line of each test case contains n integers a_1,a_2, ldots, a_n ( 1 <= q a_i <= q 50 ) -- the lengths of the logs. Note that there is no bound on the sum of n over all test cases. For each test case, print "errorgorn" if errorgorn wins or "maomao90" if maomao90 wins. (Output without quotes). In the first test case, errorgorn will be the winner. An optimal move is to chop the log of length 4 into 2 logs of length 2 . After this there will only be 4 logs of length 2 and 1 log of length 1 . After this, the only move any player can do is to chop any log of length 2 into 2 logs of length 1 . After 4 moves, it will be maomao90 's turn and he will not be able to make a move. Therefore errorgorn will be the winner. In the second test'...

Tutorials

Global Round 20 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154778644 starrysky15 A April 23, 2022, 6:15 p.m. OK Clang++17 Diagnostics TESTS 3 31 0 800
154905162 Adityakgp A April 25, 2022, 5:10 a.m. OK GNU C11 TESTS 4 0 0 800
154772159 agarwalyash541 A April 23, 2022, 5:04 p.m. OK GNU C11 TESTS 3 15 0 800
154807989 piyalsana A April 24, 2022, 4:38 a.m. OK GNU C11 TESTS 3 15 0 800
154813767 eliot_ A April 24, 2022, 6:02 a.m. OK GNU C11 TESTS 3 15 0 800
154822204 mtasfi A April 24, 2022, 7:39 a.m. OK GNU C11 TESTS 3 15 0 800
154848235 RJ05 A April 24, 2022, 12:10 p.m. OK GNU C11 TESTS 4 15 0 800
154858923 Sarwar82 A April 24, 2022, 1:52 p.m. OK GNU C11 TESTS 4 15 0 800
154787367 Meow.Meow A April 23, 2022, 8:22 p.m. OK GNU C11 TESTS 3 15 0 800
154778741 Gold_Dragon A April 23, 2022, 6:16 p.m. OK GNU C11 TESTS 3 15 0 800
154791470 samiul_CSE19 A April 23, 2022, 9:37 p.m. OK GNU C11 TESTS 3 15 0 800
154897540 Ca1se A April 25, 2022, 2:16 a.m. OK GNU C++14 TESTS 4 0 0 800
154896528 Tanu_Singh17 A April 25, 2022, 1:27 a.m. OK GNU C++14 TESTS 4 0 0 800
154896361 MiyukiKazuya A April 24, 2022, 11:39 p.m. OK GNU C++14 TESTS 4 0 0 800
154893567 afanehkareem A April 24, 2022, 10:13 p.m. OK GNU C++14 TESTS 4 0 0 800
154885295 ghosh15subhradeep A April 24, 2022, 7:28 p.m. OK GNU C++14 TESTS 4 0 0 800
154905849 pyro_skywalker A April 25, 2022, 5:24 a.m. OK GNU C++14 TESTS 4 0 0 800
154900958 nguyen83 A April 25, 2022, 3:38 a.m. OK GNU C++14 TESTS 4 0 0 800
154900804 harry_122 A April 25, 2022, 3:34 a.m. OK GNU C++14 TESTS 4 0 0 800
154900618 vinnithepooh A April 25, 2022, 3:30 a.m. OK GNU C++14 TESTS 4 0 0 800
154897828 Ufowoqqqo A April 25, 2022, 2:24 a.m. OK GNU C++14 TESTS 4 0 0 800
154902652 GodOfBug A April 25, 2022, 4:17 a.m. OK GNU C++17 TESTS 4 0 0 800
154900384 patilc125 A April 25, 2022, 3:24 a.m. OK GNU C++17 TESTS 4 0 0 800
154906368 sky_coder_ A April 25, 2022, 5:35 a.m. OK GNU C++17 TESTS 4 0 0 800
154906545 Teva A April 25, 2022, 5:39 a.m. OK GNU C++17 TESTS 4 0 0 800
154906793 LALIT9389 A April 25, 2022, 5:44 a.m. OK GNU C++17 TESTS 4 0 0 800
154905936 tasin_001 A April 25, 2022, 5:26 a.m. OK GNU C++17 TESTS 4 0 0 800
154905923 Nabuko A April 25, 2022, 5:26 a.m. OK GNU C++17 TESTS 4 0 0 800
154905488 Bharat_986 A April 25, 2022, 5:17 a.m. OK GNU C++17 TESTS 4 0 0 800
154903843 coderdj A April 25, 2022, 4:44 a.m. OK GNU C++17 TESTS 4 0 0 800
154903722 TonySnark A April 25, 2022, 4:41 a.m. OK GNU C++17 TESTS 4 0 0 800
154894627 Ayalla A April 24, 2022, 10:45 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
154906237 HP_BenLadeN A April 25, 2022, 5:32 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
154904174 jagerknight A April 25, 2022, 4:50 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
154902409 jagerknight A April 25, 2022, 4:11 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
154900232 AronSyna A April 25, 2022, 3:21 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
154896438 importlogic A April 25, 2022, 1:22 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
154883627 mattagar6 A April 24, 2022, 6:58 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
154883596 s0L0 A April 24, 2022, 6:57 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
154876674 noob_26 A April 24, 2022, 5:10 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
154871133 agul A April 24, 2022, 3:57 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
154901862 vyom_goyal A April 25, 2022, 3:58 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154900481 x44x A April 25, 2022, 3:27 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154902514 Lyde A April 25, 2022, 4:13 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154903313 zexty_fish A April 25, 2022, 4:33 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154903890 hasan2006 A April 25, 2022, 4:44 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154903984 rahimovsheroz2009 A April 25, 2022, 4:46 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154904850 Jumahanov A April 25, 2022, 5:04 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154905022 Applepi_228 A April 25, 2022, 5:07 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154905313 Lhohelhohehmm A April 25, 2022, 5:13 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154905731 baby._.shadow A April 25, 2022, 5:22 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
154774112 _abstract_ A April 23, 2022, 5:33 p.m. OK Java 11 TESTS 3 140 0 800
154834457 amitmandal A April 24, 2022, 9:54 a.m. OK Java 11 TESTS 4 140 0 800
154819682 suhas5979 A April 24, 2022, 7:14 a.m. OK Java 11 TESTS 3 140 0 800
154818387 akashkumarkly A April 24, 2022, 7 a.m. OK Java 11 TESTS 3 140 0 800
154809208 sf14t A April 24, 2022, 5:02 a.m. OK Java 11 TESTS 3 140 0 800
154907282 Longgggggggg A April 25, 2022, 5:54 a.m. OK Java 11 TESTS 4 155 0 800
154898621 suraj1_suru A April 25, 2022, 2:44 a.m. OK Java 11 TESTS 4 155 0 800
154880720 pratishank_05 A April 24, 2022, 6:09 p.m. OK Java 11 TESTS 4 155 0 800
154860959 drnoefplvv A April 24, 2022, 2:12 p.m. OK Java 11 TESTS 4 155 0 800
154830839 __Serendipity A April 24, 2022, 9:13 a.m. OK Java 11 TESTS 4 155 0 800
154773835 gssakash A April 23, 2022, 5:31 p.m. OK Java 8 TESTS 3 77 0 800
154787799 Koka A April 23, 2022, 8:29 p.m. OK Java 8 TESTS 3 77 0 800
154797500 Shemo A April 24, 2022, 12:20 a.m. OK Java 8 TESTS 3 92 0 800
154775804 GonFreecss2830 A April 23, 2022, 5:46 p.m. OK Java 8 TESTS 3 92 0 800
154783447 arutsudar A April 23, 2022, 7:20 p.m. OK Java 8 TESTS 3 93 0 800
154780333 udattam A April 23, 2022, 6:34 p.m. OK Java 8 TESTS 3 93 0 800
154777784 Arth4701 A April 23, 2022, 6:05 p.m. OK Java 8 TESTS 3 93 0 800
154897412 ArcadioN A April 25, 2022, 2:13 a.m. OK Java 8 TESTS 4 93 0 800
154832164 Merch A April 24, 2022, 9:28 a.m. OK Java 8 TESTS 4 93 0 800
154808089 tiham99 A April 24, 2022, 4:40 a.m. OK Java 8 TESTS 3 93 0 800
154838409 Koo_Pung-Kei A April 24, 2022, 10:42 a.m. OK Kotlin 1.6 TESTS 4 171 0 800
154803348 zz11-- A April 24, 2022, 3 a.m. OK MS C++ 2017 TESTS 3 0 0 800
154829937 Hxxj A April 24, 2022, 9:02 a.m. OK MS C++ 2017 TESTS 4 0 0 800
154800633 19acm A April 24, 2022, 1:55 a.m. OK MS C++ 2017 TESTS 3 0 0 800
154900159 dogoeswoof A April 25, 2022, 3:19 a.m. OK MS C++ 2017 TESTS 4 15 0 800
154897650 emailam A April 25, 2022, 2:18 a.m. OK MS C++ 2017 TESTS 4 15 0 800
154886860 Gadi A April 24, 2022, 7:59 p.m. OK MS C++ 2017 TESTS 4 15 0 800
154844763 xuancx A April 24, 2022, 11:41 a.m. OK MS C++ 2017 TESTS 4 15 0 800
154803993 Fish_L A April 24, 2022, 3:15 a.m. OK MS C++ 2017 TESTS 3 15 0 800
154845096 1371597521 A April 24, 2022, 11:44 a.m. OK MS C++ 2017 TESTS 4 15 4096000 800
154891727 Keto99 A April 24, 2022, 9:32 p.m. OK .NET Core C# TESTS 4 62 2764800 800
154776207 1_2_3_4_5_9 A April 23, 2022, 5:50 p.m. OK PyPy 2 TESTS 3 62 819200 800
154831439 3juhwan A April 24, 2022, 9:20 a.m. OK PyPy 3 TESTS 4 62 1331200 800
154783499 ambs_ A April 23, 2022, 7:21 p.m. OK PyPy 3 TESTS 3 62 1433600 800
154779215 sigilius A April 23, 2022, 6:21 p.m. OK PyPy 3 TESTS 3 62 1433600 800
154773557 __J__ A April 23, 2022, 5:30 p.m. OK PyPy 3 TESTS 3 62 1433600 800
154807328 a01368665 A April 24, 2022, 4:24 a.m. OK PyPy 3 TESTS 3 77 1433600 800
154874591 MohammadsadraSedighin A April 24, 2022, 4:37 p.m. OK PyPy 3 TESTS 4 77 1433600 800
154775786 __Nobel__3 A April 23, 2022, 5:46 p.m. OK PyPy 3 TESTS 3 77 1433600 800
154774659 brimstone A April 23, 2022, 5:37 p.m. OK PyPy 3 TESTS 3 77 1536000 800
154879216 Pythonic_Python1 A April 24, 2022, 5:47 p.m. OK PyPy 3 TESTS 4 77 1638400 800
154782436 Midhilesh A April 23, 2022, 7:06 p.m. OK PyPy 3 TESTS 3 92 1433600 800
154888286 Bucher A April 24, 2022, 8:26 p.m. OK PyPy 3-64 TESTS 4 46 2150400 800
154876852 ZED_118 A April 24, 2022, 5:13 p.m. OK PyPy 3-64 TESTS 4 46 2150400 800
154873620 Youarenotgood A April 24, 2022, 4:23 p.m. OK PyPy 3-64 TESTS 4 46 2150400 800
154800522 12345_23 A April 24, 2022, 1:52 a.m. OK PyPy 3-64 TESTS 3 46 2150400 800
154790046 MayThe4rceBWY A April 23, 2022, 9:10 p.m. OK PyPy 3-64 TESTS 3 46 2150400 800
154791604 notTehlka A April 23, 2022, 9:39 p.m. OK PyPy 3-64 TESTS 3 46 2355200 800
154850347 aman404found A April 24, 2022, 12:29 p.m. OK PyPy 3-64 TESTS 4 46 2355200 800
154803550 rivnam A April 24, 2022, 3:05 a.m. OK PyPy 3-64 TESTS 3 46 2355200 800
154800976 Mustela_Erminea A April 24, 2022, 2:03 a.m. OK PyPy 3-64 TESTS 3 46 2355200 800
154792492 MistaAsh A April 23, 2022, 9:59 p.m. OK PyPy 3-64 TESTS 3 46 2355200 800
154843201 Sounika A April 24, 2022, 11:29 a.m. OK Python 3 TESTS 4 30 0 800
154896355 blucell A April 24, 2022, 11:39 p.m. OK Python 3 TESTS 4 30 0 800
154823595 its_AK A April 24, 2022, 7:55 a.m. OK Python 3 TESTS 3 30 0 800
154819072 Uruguay A April 24, 2022, 7:07 a.m. OK Python 3 TESTS 3 30 0 800
154787261 jeetchovatia A April 23, 2022, 8:21 p.m. OK Python 3 TESTS 3 30 0 800
154883443 Mueez_073 A April 24, 2022, 6:54 p.m. OK Python 3 TESTS 4 31 0 800
154906259 sheknows A April 25, 2022, 5:33 a.m. OK Python 3 TESTS 4 31 0 800
154867412 h3110_fr13nd A April 24, 2022, 3:24 p.m. OK Python 3 TESTS 4 31 0 800
154867012 aayush_chhabra A April 24, 2022, 3:19 p.m. OK Python 3 TESTS 4 31 0 800
154864389 manojsagar066 A April 24, 2022, 2:50 p.m. OK Python 3 TESTS 4 31 0 800
154780155 utkarsh A April 23, 2022, 6:32 p.m. OK Ruby 3 TESTS 3 202 0 800
154874980 Spheniscine A April 24, 2022, 4:43 p.m. OK Rust 2021 TESTS 4 15 102400 800

remove filters

Back to search problems