Codeforces Round 658 (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
1382 Codeforces Round 658 (Div. 2) FINISHED False 7200 141837863 July 21, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24881 ) B Sequential Nim PROGRAMMING games 1100

B'There are n piles of stones, where the i -th pile has a_i stones. Two people play a game, where they take alternating turns removing stones. In a move, a player may remove a positive number of stones from the first non-empty pile (the pile with the minimal index, that has at least one stone). The first player who cannot make a move (because all piles are empty) loses the game. If both players play optimally, determine the winner of the game. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next 2t lines contain descriptions of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the number of piles. The second line of each test case contains n integers a_1, ldots,a_n ( 1 <= a_i <= 10^9 ) -- a_i is equal to the number of stones in the i -th pile. It is guaranteed that the sum of n for all test cases does not exceed 10^5 . For each test case, if the player who makes the first move will win, output "First". Otherwise, output "Second". In the first test case, the first player will win the game. His winning strategy is: '...

Tutorials

Codeforces Round #658 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
87617354 Gassa B July 21, 2020, 10:07 p.m. OK D TESTS 19 31 8908800 1100
87565289 ruban B July 21, 2020, 3:34 p.m. OK Delphi TESTS 19 46 16486400 1100
87594164 tranminhprvt01 B July 21, 2020, 4:34 p.m. OK FPC TESTS 19 46 3481600 1100
87593167 phgquynh2208 B July 21, 2020, 4:33 p.m. OK FPC TESTS 19 46 3891200 1100
87626379 fpc_coder B July 22, 2020, 2:41 a.m. OK FPC TESTS 19 61 3891200 1100
87629256 Wily_33 B July 22, 2020, 3:41 a.m. OK GNU C11 TESTS 19 46 3686400 1100
87558330 fishybestgirl B July 21, 2020, 3:22 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87561765 Amin.s B July 21, 2020, 3:28 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87565412 Wasif_Hamid B July 21, 2020, 3:34 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87571188 kubik127 B July 21, 2020, 3:46 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87602832 Khayrulmithu B July 21, 2020, 6:12 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87603015 SUNNY24 B July 21, 2020, 6:14 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87603382 SUNNY24 B July 21, 2020, 6:17 p.m. OK GNU C11 TESTS 19 46 3686400 1100
87613545 AtulNits B July 21, 2020, 8:39 p.m. OK GNU C11 TESTS 19 46 4096000 1100
87634201 Icodent B July 22, 2020, 5:09 a.m. OK GNU C11 TESTS 19 46 4096000 1100
87598050 SPyofgame B July 21, 2020, 5:33 p.m. OK GNU C++11 TESTS 19 30 4300800 1100
87558299 void_basic_learner B July 21, 2020, 3:22 p.m. OK GNU C++11 TESTS 19 30 4300800 1100
87629081 zlczlc B July 22, 2020, 3:38 a.m. OK GNU C++11 TESTS 19 30 4403200 1100
87634718 _muzi B July 22, 2020, 5:16 a.m. OK GNU C++11 TESTS 19 31 4096000 1100
87561974 Watson_2020 B July 21, 2020, 3:28 p.m. OK GNU C++11 TESTS 19 31 4300800 1100
87560321 vectorwyx B July 21, 2020, 3:25 p.m. OK GNU C++11 TESTS 19 31 4300800 1100
87634084 angel1990. B July 22, 2020, 5:07 a.m. OK GNU C++11 TESTS 19 31 4300800 1100
87623469 new_xyq B July 22, 2020, 1:33 a.m. OK GNU C++11 TESTS 19 31 4300800 1100
87589519 yxd B July 21, 2020, 4:26 p.m. OK GNU C++11 TESTS 19 31 4300800 1100
87564295 pingxiong B July 21, 2020, 3:32 p.m. OK GNU C++11 TESTS 19 31 4300800 1100
87626364 Kurihada B July 22, 2020, 2:40 a.m. OK GNU C++14 TESTS 19 31 3686400 1100
87553815 vishnu_m B July 21, 2020, 3:14 p.m. OK GNU C++14 TESTS 19 31 4096000 1100
87633263 rama_pang B July 22, 2020, 4:53 a.m. OK GNU C++14 TESTS 19 31 4096000 1100
87637888 wubbalubbabugbug B July 22, 2020, 5:59 a.m. OK GNU C++14 TESTS 19 46 3686400 1100
87581895 _Captain_Jack_Sparrow B July 21, 2020, 4:09 p.m. OK GNU C++14 TESTS 19 46 3686400 1100
87607601 robertyu02 B July 21, 2020, 7:05 p.m. OK GNU C++14 TESTS 19 46 3686400 1100
87623311 Marota B July 22, 2020, 1:29 a.m. OK GNU C++14 TESTS 19 46 3686400 1100
87603327 coolreshab B July 21, 2020, 6:17 p.m. OK GNU C++14 TESTS 19 46 3686400 1100
87592750 Hyuck B July 21, 2020, 4:32 p.m. OK GNU C++14 TESTS 19 46 3686400 1100
87607236 arqum123 B July 21, 2020, 7 p.m. OK GNU C++14 TESTS 19 46 3686400 1100
87598215 psbs B July 21, 2020, 5:34 p.m. OK GNU C++17 TESTS 19 31 4096000 1100
87633209 arsh_16 B July 22, 2020, 4:52 a.m. OK GNU C++17 TESTS 19 31 4096000 1100
87572677 Clouder0 B July 21, 2020, 3:49 p.m. OK GNU C++17 TESTS 19 31 5324800 1100
87636141 foucault B July 22, 2020, 5:36 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87623178 ConstantEcho B July 22, 2020, 1:25 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87636049 Malvino B July 22, 2020, 5:34 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87634285 Axthe_E_I B July 22, 2020, 5:10 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87630201 karangreat B July 22, 2020, 3:58 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87630032 karangreat B July 22, 2020, 3:55 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87629491 Prosperity B July 22, 2020, 3:45 a.m. OK GNU C++17 TESTS 19 46 3686400 1100
87564981 suspense2001 B July 21, 2020, 3:33 p.m. OK GNU C++17 (64) TESTS 19 31 4300800 1100
87564257 davidSC B July 21, 2020, 3:32 p.m. OK GNU C++17 (64) TESTS 19 31 4300800 1100
87616228 emorgan5289 B July 21, 2020, 9:38 p.m. OK GNU C++17 (64) TESTS 19 31 4300800 1100
87618613 RandomNumber B July 21, 2020, 10:46 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87564044 jdvoid_44 B July 21, 2020, 3:32 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87565171 Mormo_1703119 B July 21, 2020, 3:34 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87574227 Alequisk B July 21, 2020, 3:52 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87599164 Capitan B July 21, 2020, 5:40 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87606289 conquizztador B July 21, 2020, 6:49 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87616518 mostafadelgouda B July 21, 2020, 9:46 p.m. OK GNU C++17 (64) TESTS 19 31 4710400 1100
87608092 meooow B July 21, 2020, 7:11 p.m. OK Go TESTS 19 31 11059200 1100
87601824 jojo1094 B July 21, 2020, 6:03 p.m. OK Go TESTS 19 46 10854400 1100
87601792 jojo1094 B July 21, 2020, 6:02 p.m. OK Go TESTS 19 46 11059200 1100
87553312 TearFox B July 21, 2020, 3:13 p.m. OK Haskell TESTS 19 140 26316800 1100
87559658 sf14t B July 21, 2020, 3:24 p.m. OK Java 11 TESTS 19 171 23756800 1100
87575868 supershravan469 B July 21, 2020, 3:55 p.m. OK Java 11 TESTS 19 186 23756800 1100
87579528 bckslsh03 B July 21, 2020, 4:04 p.m. OK Java 11 TESTS 19 187 23756800 1100
87564936 aquarius_gaurav B July 21, 2020, 3:33 p.m. OK Java 11 TESTS 19 187 23756800 1100
87554311 akman10 B July 21, 2020, 3:15 p.m. OK Java 11 TESTS 19 187 23756800 1100
87567563 mp_68 B July 21, 2020, 3:38 p.m. OK Java 11 TESTS 19 187 23961600 1100
87583775 tirth485 B July 21, 2020, 4:13 p.m. OK Java 11 TESTS 19 187 24166400 1100
87559448 DreamInfinite B July 21, 2020, 3:24 p.m. OK Java 11 TESTS 19 187 24166400 1100
87613930 tirtho2107 B July 21, 2020, 8:47 p.m. OK Java 11 TESTS 19 187 27238400 1100
87619332 bobib B July 21, 2020, 11:07 p.m. OK Java 11 TESTS 19 202 23756800 1100
87574398 _maverick B July 21, 2020, 3:52 p.m. OK Java 8 TESTS 19 109 20377600 1100
87558266 MubtasimShahriar B July 21, 2020, 3:22 p.m. OK Java 8 TESTS 19 109 20377600 1100
87588182 pupil_forever B July 21, 2020, 4:23 p.m. OK Java 8 TESTS 19 109 20480000 1100
87573639 verysmartkid B July 21, 2020, 3:51 p.m. OK Java 8 TESTS 19 109 20787200 1100
87607203 VictorN00 B July 21, 2020, 7 p.m. OK Java 8 TESTS 19 124 20377600 1100
87636030 chaitanya11 B July 22, 2020, 5:34 a.m. OK Java 8 TESTS 19 124 20377600 1100
87633849 Keyur21 B July 22, 2020, 5:03 a.m. OK Java 8 TESTS 19 124 20377600 1100
87626706 HimanshuRajvanshi B July 22, 2020, 2:48 a.m. OK Java 8 TESTS 19 124 20377600 1100
87597145 nandit B July 21, 2020, 5:28 p.m. OK Java 8 TESTS 19 124 20377600 1100
87562424 pH7 B July 21, 2020, 3:29 p.m. OK Java 8 TESTS 19 124 20377600 1100
87571112 kadalijo B July 21, 2020, 3:46 p.m. OK Kotlin TESTS 19 156 22528000 1100
87600354 Tlatoani B July 21, 2020, 5:49 p.m. OK Kotlin TESTS 19 171 25088000 1100
87607699 DieAnderen B July 21, 2020, 7:06 p.m. OK Kotlin TESTS 19 280 21299200 1100
87602406 EmK B July 21, 2020, 6:08 p.m. OK Mono C# TESTS 19 77 11980800 1100
87601812 EmK B July 21, 2020, 6:03 p.m. OK Mono C# TESTS 19 93 11980800 1100
87565202 osthir B July 21, 2020, 3:34 p.m. OK Mono C# TESTS 19 93 19046400 1100
87626017 _Trung_Nguyen B July 22, 2020, 2:33 a.m. OK Mono C# TESTS 19 93 91136000 1100
87620232 THETROUBLEMAKER B July 21, 2020, 11:43 p.m. OK Mono C# TESTS 19 108 20275200 1100
87563987 flu2 B July 21, 2020, 3:32 p.m. OK Mono C# TESTS 19 124 24166400 1100
87617385 braher B July 21, 2020, 10:08 p.m. OK Mono C# TESTS 19 140 19660800 1100
87636508 siscon_org B July 22, 2020, 5:41 a.m. OK MS C++ TESTS 19 46 4608000 1100
87577540 -ka B July 21, 2020, 3:59 p.m. OK MS C++ TESTS 19 108 4096000 1100
87575638 CFWudanna B July 21, 2020, 3:55 p.m. OK MS C++ TESTS 19 108 4608000 1100
87605557 Pilacis B July 21, 2020, 6:40 p.m. OK MS C++ TESTS 19 109 4096000 1100
87561310 theweird B July 21, 2020, 3:27 p.m. OK MS C++ TESTS 19 109 4505600 1100
87566621 YTICpoch B July 21, 2020, 3:37 p.m. OK MS C++ TESTS 19 109 4915200 1100
87573981 tranthanhtra B July 21, 2020, 3:51 p.m. OK MS C++ TESTS 19 109 5120000 1100
87588012 zjut201906150333zyf B July 21, 2020, 4:23 p.m. OK MS C++ 2017 TESTS 19 46 4812800 1100
87556677 FarmerThy B July 21, 2020, 3:19 p.m. OK MS C++ 2017 TESTS 19 46 4812800 1100
87568809 IndignantHydra B July 21, 2020, 3:41 p.m. OK MS C++ 2017 TESTS 19 46 5222400 1100
87587080 qing_lin B July 21, 2020, 4:21 p.m. OK MS C++ 2017 TESTS 19 61 4096000 1100
87563278 RobinEatCorn B July 21, 2020, 3:30 p.m. OK MS C++ 2017 TESTS 19 61 4096000 1100
87568780 dingzhao777 B July 21, 2020, 3:41 p.m. OK MS C++ 2017 TESTS 19 62 4096000 1100
87561351 dundae B July 21, 2020, 3:27 p.m. OK MS C++ 2017 TESTS 19 62 4403200 1100
87564367 201903007540 B July 21, 2020, 3:32 p.m. OK MS C++ 2017 TESTS 19 62 13312000 1100
87562178 grimkel B July 21, 2020, 3:28 p.m. OK MS C++ 2017 TESTS 19 108 4096000 1100
87579769 pandoomanda B July 21, 2020, 4:04 p.m. OK MS C++ 2017 TESTS 19 108 4505600 1100
87604914 mayakin B July 21, 2020, 6:33 p.m. OK PHP TESTS 19 46 13926400 1100
87558663 _aLso B July 21, 2020, 3:22 p.m. OK PyPy 2 TESTS 19 140 30310400 1100
87562573 crapplet B July 21, 2020, 3:29 p.m. OK PyPy 2 TESTS 19 140 31539200 1100
87553091 Gaurav1 B July 21, 2020, 3:13 p.m. OK PyPy 2 TESTS 19 155 37888000 1100
87567673 chaudhary_19 B July 21, 2020, 3:39 p.m. OK PyPy 2 TESTS 19 171 33075200 1100
87561477 daniel.carlos B July 21, 2020, 3:27 p.m. OK PyPy 2 TESTS 19 186 30412800 1100
87553580 bazzyadb B July 21, 2020, 3:14 p.m. OK PyPy 2 TESTS 19 202 30412800 1100
87558427 mo-hit B July 21, 2020, 3:22 p.m. OK PyPy 2 TESTS 19 218 37376000 1100
87566046 Satwik_Tiwari B July 21, 2020, 3:35 p.m. OK PyPy 2 TESTS 19 233 35532800 1100
87573316 jaimahajan B July 21, 2020, 3:50 p.m. OK PyPy 2 TESTS 19 420 40140800 1100
87568070 2019ucp1350 B July 21, 2020, 3:39 p.m. OK PyPy 3 TESTS 19 171 29388800 1100
87599270 bravotango B July 21, 2020, 5:41 p.m. OK PyPy 3 TESTS 19 171 29798400 1100
87570762 a0976531005 B July 21, 2020, 3:45 p.m. OK PyPy 3 TESTS 19 171 30003200 1100
87635085 Anuranjan_Pandey B July 22, 2020, 5:22 a.m. OK PyPy 3 TESTS 19 186 29286400 1100
87576238 PracticeAccountICL B July 21, 2020, 3:56 p.m. OK PyPy 3 TESTS 19 186 29286400 1100
87598876 bravotango B July 21, 2020, 5:38 p.m. OK PyPy 3 TESTS 19 186 29798400 1100
87599309 ecnerwala B July 21, 2020, 5:41 p.m. OK PyPy 3 TESTS 19 202 28262400 1100
87557557 unknown_2433 B July 21, 2020, 3:20 p.m. OK PyPy 3 TESTS 19 202 29184000 1100
87556935 siddhantgarg11 B July 21, 2020, 3:19 p.m. OK PyPy 3 TESTS 19 202 29286400 1100
87570293 L01c B July 21, 2020, 3:44 p.m. OK PyPy 3 TESTS 19 202 30208000 1100
87609237 ComptineDunAutreEte B July 21, 2020, 7:27 p.m. OK Python 2 TESTS 19 202 12083200 1100
87571067 psaini B July 21, 2020, 3:46 p.m. OK Python 2 TESTS 19 202 12083200 1100
87562000 Bluefish2 B July 21, 2020, 3:28 p.m. OK Python 2 TESTS 19 202 12083200 1100
87634048 mokshasood06 B July 22, 2020, 5:06 a.m. OK Python 2 TESTS 19 202 12800000 1100
87601240 Hitikkumar B July 21, 2020, 5:57 p.m. OK Python 2 TESTS 19 217 11980800 1100
87584292 elistark B July 21, 2020, 4:15 p.m. OK Python 2 TESTS 19 217 12083200 1100
87633577 ShadhinAshraf B July 22, 2020, 4:59 a.m. OK Python 2 TESTS 19 218 12083200 1100
87559738 lalith_krg1 B July 21, 2020, 3:24 p.m. OK Python 2 TESTS 19 234 13004800 1100
87569984 braimann B July 21, 2020, 3:43 p.m. OK Python 3 TESTS 19 109 13926400 1100
87593073 mijoo B July 21, 2020, 4:32 p.m. OK Python 3 TESTS 19 109 14131200 1100
87604659 eugalt B July 21, 2020, 6:30 p.m. OK Python 3 TESTS 19 109 14950400 1100
87603524 eugalt B July 21, 2020, 6:18 p.m. OK Python 3 TESTS 19 109 14950400 1100
87609408 eugalt B July 21, 2020, 7:30 p.m. OK Python 3 TESTS 19 124 8908800 1100
87606519 eugalt B July 21, 2020, 6:52 p.m. OK Python 3 TESTS 19 124 8908800 1100
87555620 y.manojkrishna B July 21, 2020, 3:17 p.m. OK Python 3 TESTS 19 124 13824000 1100
87567652 b2stts2b B July 21, 2020, 3:39 p.m. OK Python 3 TESTS 19 124 14131200 1100
87634211 raunak_priyam B July 22, 2020, 5:09 a.m. OK Python 3 TESTS 19 124 14848000 1100
87637043 uddeshya.singh B July 22, 2020, 5:48 a.m. OK Python 3 TESTS 19 124 15155200 1100
87578232 starry_night B July 21, 2020, 4:01 p.m. OK Ruby TESTS 19 577 56115200 1100
87565015 sheremi33 B July 21, 2020, 3:34 p.m. OK Ruby TESTS 19 577 56115200 1100
87581944 freshnewname B July 21, 2020, 4:09 p.m. OK Rust TESTS 19 31 5836800 1100
87579335 DaveFol B July 21, 2020, 4:03 p.m. OK Rust TESTS 19 31 7168000 1100
87575144 GeoffreyY B July 21, 2020, 3:54 p.m. OK Rust TESTS 19 46 7065600 1100
87621386 bqn B July 22, 2020, 12:26 a.m. OK Rust TESTS 19 46 7680000 1100
87588068 wweihao.zj B July 21, 2020, 4:23 p.m. OK Rust TESTS 19 62 6860800 1100
87582962 BridgeBurner B July 21, 2020, 4:12 p.m. OK Scala TESTS 19 577 49971200 1100

remove filters

Back to search problems