Codeforces Round 671 (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
1419 Codeforces Round 671 (Div. 2) FINISHED False 7200 136826711 Sept. 19, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19717 ) A Digit Game PROGRAMMING games implementation

B"Everyone knows that agents in Valorant decide, who will play as attackers, and who will play as defenders. To do that Raze and Breach decided to play t matches of a digit game... In each of t matches of the digit game, a positive integer is generated. It consists of n digits. The digits of this integer are numerated from 1 to n from the highest-order digit to the lowest-order digit. After this integer is announced, the match starts. Agents play in turns. Raze starts. In one turn an agent can choose any unmarked digit and mark it. Raze can choose digits on odd positions, but can not choose digits on even positions. Breach can choose digits on even positions, but can not choose digits on odd positions. The match ends, when there is only one unmarked digit left. If the single last digit is odd, then Raze wins, else Breach wins. It can be proved, that before the end of the match (for every initial integer with n digits) each agent has an ability to make a turn, i.e. there is at least one unmarked digit, that stands on a position of required parity. For each of t matches find out, which agent wins, if both of them want to win and play optimally. First line of input contains an integer t (1 <= t <= 100) -- the number of matches. The first line of each match description contains an integer n (1 <= n <= 10^3) -- the number of digits of the generated number. The second line of each match description contains an n -digit positive integer without leading zeros. For each match print 1 , if Raze wins, and 2 , if Breach wins. In the first match no one can make a turn, the only digit left is 2 , it's even, so Breach wins. In the second match the only digit left is 3 , it's odd, so Raze wins. In the third match Raze can mark the last digit, after that Breach can only mark 0 . 1 will be the last digit left, it's odd, so Raze wins. In the fourth match no matter ho"...

Tutorials

Codeforces Round #671 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
93293399 impuk A Sept. 20, 2020, 1:50 a.m. OK FPC TESTS 83 46 1126400
93267121 raman0971 A Sept. 19, 2020, 4:32 p.m. OK GNU C11 TESTS 83 31 0
93296997 Uttam678 A Sept. 20, 2020, 3:28 a.m. OK GNU C11 TESTS 83 31 0
93280998 toki-debug A Sept. 19, 2020, 7:43 p.m. OK GNU C11 TESTS 83 31 0
93273370 aryanpandeya A Sept. 19, 2020, 6:31 p.m. OK GNU C11 TESTS 83 31 0
93281761 yt1234 A Sept. 19, 2020, 7:55 p.m. OK GNU C11 TESTS 83 31 0
93290483 medissa123 A Sept. 19, 2020, 11:51 p.m. OK GNU C11 TESTS 83 31 0
93290883 KCSB A Sept. 20, 2020, 12:10 a.m. OK GNU C11 TESTS 83 31 0
93291492 CAPHENY A Sept. 20, 2020, 12:39 a.m. OK GNU C11 TESTS 83 31 0
93300640 anonymous_error A Sept. 20, 2020, 4:42 a.m. OK GNU C11 TESTS 83 46 0
93301836 mynamemosta A Sept. 20, 2020, 5:05 a.m. OK GNU C++11 TESTS 83 31 0
93305266 sweet_hope25 A Sept. 20, 2020, 6 a.m. OK GNU C++11 TESTS 83 31 0
93304325 nkdanta1 A Sept. 20, 2020, 5:46 a.m. OK GNU C++11 TESTS 83 31 0
93304281 Dzhao A Sept. 20, 2020, 5:45 a.m. OK GNU C++11 TESTS 83 31 0
93303382 thesatyakidas.00220033 A Sept. 20, 2020, 5:31 a.m. OK GNU C++11 TESTS 83 31 0
93303053 sid6123 A Sept. 20, 2020, 5:26 a.m. OK GNU C++11 TESTS 83 31 0
93302535 dharansh121 A Sept. 20, 2020, 5:17 a.m. OK GNU C++11 TESTS 83 31 0
93302295 usman2306 A Sept. 20, 2020, 5:13 a.m. OK GNU C++11 TESTS 83 31 0
93301494 anurag13988935 A Sept. 20, 2020, 4:59 a.m. OK GNU C++11 TESTS 83 31 0
93300884 ak149 A Sept. 20, 2020, 4:47 a.m. OK GNU C++11 TESTS 83 31 0
93303421 hp_stormbreaker21 A Sept. 20, 2020, 5:32 a.m. OK GNU C++14 TESTS 83 31 0
93303749 abhi1358 A Sept. 20, 2020, 5:37 a.m. OK GNU C++14 TESTS 83 31 0
93303883 Player0109 A Sept. 20, 2020, 5:40 a.m. OK GNU C++14 TESTS 83 31 0
93304150 pks001 A Sept. 20, 2020, 5:43 a.m. OK GNU C++14 TESTS 83 31 0
93304476 i.won A Sept. 20, 2020, 5:48 a.m. OK GNU C++14 TESTS 83 31 0
93300980 nimitha1jagadeesha A Sept. 20, 2020, 4:49 a.m. OK GNU C++14 TESTS 83 31 0
93301252 Ah_naf A Sept. 20, 2020, 4:54 a.m. OK GNU C++14 TESTS 83 31 0
93300970 strawberryshaker2005 A Sept. 20, 2020, 4:49 a.m. OK GNU C++14 TESTS 83 31 0
93300549 kartikgoel883 A Sept. 20, 2020, 4:40 a.m. OK GNU C++14 TESTS 83 31 0
93300424 worst_coder_ever A Sept. 20, 2020, 4:38 a.m. OK GNU C++14 TESTS 83 31 0
93303812 uddeshya A Sept. 20, 2020, 5:38 a.m. OK GNU C++17 TESTS 83 31 0
93304997 shaanrj A Sept. 20, 2020, 5:56 a.m. OK GNU C++17 TESTS 83 31 0
93304766 akulpakul A Sept. 20, 2020, 5:52 a.m. OK GNU C++17 TESTS 83 31 0
93304329 anayg136 A Sept. 20, 2020, 5:46 a.m. OK GNU C++17 TESTS 83 31 0
93303985 shreyas_710 A Sept. 20, 2020, 5:41 a.m. OK GNU C++17 TESTS 83 31 0
93305078 iq0 A Sept. 20, 2020, 5:57 a.m. OK GNU C++17 TESTS 83 31 0
93303626 MARK4209 A Sept. 20, 2020, 5:35 a.m. OK GNU C++17 TESTS 83 31 0
93303556 qwq_iris A Sept. 20, 2020, 5:34 a.m. OK GNU C++17 TESTS 83 31 0
93303495 IamDeep_9571 A Sept. 20, 2020, 5:33 a.m. OK GNU C++17 TESTS 83 31 0
93303476 keep_it_aniii A Sept. 20, 2020, 5:33 a.m. OK GNU C++17 TESTS 83 31 0
93304689 Aman_j1 A Sept. 20, 2020, 5:51 a.m. OK GNU C++17 (64) TESTS 83 31 0
93305088 prasanna2425 A Sept. 20, 2020, 5:57 a.m. OK GNU C++17 (64) TESTS 83 31 0
93302204 king-in-the-south A Sept. 20, 2020, 5:11 a.m. OK GNU C++17 (64) TESTS 83 31 0
93301105 Sooh31 A Sept. 20, 2020, 4:51 a.m. OK GNU C++17 (64) TESTS 83 31 0
93299921 Tauzn A Sept. 20, 2020, 4:27 a.m. OK GNU C++17 (64) TESTS 83 31 0
93296426 Theofratus A Sept. 20, 2020, 3:14 a.m. OK GNU C++17 (64) TESTS 83 31 0
93296034 6520 A Sept. 20, 2020, 3:04 a.m. OK GNU C++17 (64) TESTS 83 31 0
93296021 Perdente A Sept. 20, 2020, 3:03 a.m. OK GNU C++17 (64) TESTS 83 31 0
93295279 lwktxdy A Sept. 20, 2020, 2:44 a.m. OK GNU C++17 (64) TESTS 83 31 0
93294452 wakaka A Sept. 20, 2020, 2:21 a.m. OK GNU C++17 (64) TESTS 83 31 0
93283977 clyring A Sept. 19, 2020, 8:33 p.m. OK Haskell TESTS 83 31 102400
93302308 anshum_it_is A Sept. 20, 2020, 5:13 a.m. OK Java 11 TESTS 83 171 0
93294181 tusharjape007 A Sept. 20, 2020, 2:14 a.m. OK Java 11 TESTS 83 186 0
93303005 Bogdan_Iacob A Sept. 20, 2020, 5:25 a.m. OK Java 11 TESTS 83 186 0
93295446 sam_code A Sept. 20, 2020, 2:48 a.m. OK Java 11 TESTS 83 186 0
93284248 TheRunner A Sept. 19, 2020, 8:38 p.m. OK Java 11 TESTS 83 186 0
93280384 sorcerer.strange A Sept. 19, 2020, 7:35 p.m. OK Java 11 TESTS 83 186 0
93296882 jeeb0xical A Sept. 20, 2020, 3:26 a.m. OK Java 11 TESTS 83 187 0
93280594 sorcerer.strange A Sept. 19, 2020, 7:37 p.m. OK Java 11 TESTS 83 187 0
93286741 _prophet A Sept. 19, 2020, 9:35 p.m. OK Java 11 TESTS 83 187 0
93287358 _prophet A Sept. 19, 2020, 9:51 p.m. OK Java 11 TESTS 83 187 0
93279636 Digvijaysingh0707 A Sept. 19, 2020, 7:25 p.m. OK Java 8 TESTS 83 109 0
93282498 BigBrainInsane A Sept. 19, 2020, 8:06 p.m. OK Java 8 TESTS 83 109 0
93281618 vikram987 A Sept. 19, 2020, 7:52 p.m. OK Java 8 TESTS 83 109 0
93281553 kareem3id A Sept. 19, 2020, 7:51 p.m. OK Java 8 TESTS 83 109 0
93281157 kadintang1 A Sept. 19, 2020, 7:45 p.m. OK Java 8 TESTS 83 109 0
93300141 ashraybharambe A Sept. 20, 2020, 4:32 a.m. OK Java 8 TESTS 83 109 0
93294604 Pranay2516 A Sept. 20, 2020, 2:26 a.m. OK Java 8 TESTS 83 109 0
93298940 punit31 A Sept. 20, 2020, 4:08 a.m. OK Java 8 TESTS 83 124 0
93289753 pdk.abhishek A Sept. 19, 2020, 11:16 p.m. OK Java 8 TESTS 83 124 0
93304897 porwalok A Sept. 20, 2020, 5:54 a.m. OK Java 8 TESTS 83 124 0
93297972 Spheniscine A Sept. 20, 2020, 3:48 a.m. OK Kotlin TESTS 83 124 0
93273853 v4_adi A Sept. 19, 2020, 6:33 p.m. OK Kotlin TESTS 83 140 0
93280069 koper A Sept. 19, 2020, 7:30 p.m. OK Kotlin TESTS 83 140 0
93279522 orloffm A Sept. 19, 2020, 7:24 p.m. OK Mono C# TESTS 83 62 409600
93304052 TRR A Sept. 20, 2020, 5:42 a.m. OK Mono C# TESTS 83 62 409600
93304902 sagarthecoder2 A Sept. 20, 2020, 5:54 a.m. OK Mono C# TESTS 83 77 1331200
93282003 DiSTRuCtO A Sept. 19, 2020, 7:58 p.m. OK MS C++ TESTS 83 46 0
93292691 Torehalt A Sept. 20, 2020, 1:28 a.m. OK MS C++ 2017 TESTS 83 31 0
93304659 RED_DRAG_EMPOROR A Sept. 20, 2020, 5:51 a.m. OK MS C++ 2017 TESTS 83 31 0
93275773 YaMi506 A Sept. 19, 2020, 6:46 p.m. OK MS C++ 2017 TESTS 83 31 0
93278116 Megalitum A Sept. 19, 2020, 7:08 p.m. OK MS C++ 2017 TESTS 83 46 0
93304179 MeshTag A Sept. 20, 2020, 5:44 a.m. OK MS C++ 2017 TESTS 83 46 0
93293725 SnowChildren A Sept. 20, 2020, 2 a.m. OK MS C++ 2017 TESTS 83 46 0
93291147 omar23_2 A Sept. 20, 2020, 12:24 a.m. OK MS C++ 2017 TESTS 83 46 0
93281112 Awa149 A Sept. 19, 2020, 7:44 p.m. OK MS C++ 2017 TESTS 83 46 0
93279719 Dmitry_83 A Sept. 19, 2020, 7:26 p.m. OK MS C++ 2017 TESTS 83 46 0
93273704 TheSherlockHomie A Sept. 19, 2020, 6:33 p.m. OK MS C++ 2017 TESTS 83 46 0
93279539 orloffm A Sept. 19, 2020, 7:24 p.m. OK .NET Core C# TESTS 83 109 409600
93291857 terry_u16 A Sept. 20, 2020, 12:55 a.m. OK .NET Core C# TESTS 83 109 819200
93291872 terry_u16 A Sept. 20, 2020, 12:56 a.m. OK .NET Core C# TESTS 83 109 1638400
93291706 terry_u16 A Sept. 20, 2020, 12:49 a.m. OK .NET Core C# TESTS 83 109 2048000
93278004 explorer_sifat A Sept. 19, 2020, 7:07 p.m. OK Node.js TESTS 83 93 102400
93283464 chaudhary_19 A Sept. 19, 2020, 8:23 p.m. OK PyPy 2 TESTS 83 171 2252800
93272493 snape_here A Sept. 19, 2020, 6:27 p.m. OK PyPy 2 TESTS 83 218 7884800
93282476 noobiezoob A Sept. 19, 2020, 8:06 p.m. OK PyPy 3 TESTS 83 140 204800
93278259 Nifer A Sept. 19, 2020, 7:09 p.m. OK PyPy 3 TESTS 83 140 307200
93278492 Nifer A Sept. 19, 2020, 7:12 p.m. OK PyPy 3 TESTS 83 140 307200
93279119 vvedant99 A Sept. 19, 2020, 7:19 p.m. OK PyPy 3 TESTS 83 155 204800
93276978 Hdk2127 A Sept. 19, 2020, 6:57 p.m. OK PyPy 3 TESTS 83 155 204800
93275276 tannatsri A Sept. 19, 2020, 6:42 p.m. OK PyPy 3 TESTS 83 155 204800
93278557 Nifer A Sept. 19, 2020, 7:12 p.m. OK PyPy 3 TESTS 83 155 307200
93277771 Nifer A Sept. 19, 2020, 7:04 p.m. OK PyPy 3 TESTS 83 155 307200
93304972 rajbit A Sept. 20, 2020, 5:55 a.m. OK PyPy 3 TESTS 83 155 409600
93303759 Anuranjan_Pandey A Sept. 20, 2020, 5:37 a.m. OK PyPy 3 TESTS 83 155 409600
93279802 ComptineDunAutreEte A Sept. 19, 2020, 7:27 p.m. OK Python 2 TESTS 83 218 102400
93274983 301_anky A Sept. 19, 2020, 6:40 p.m. OK Python 3 TESTS 83 109 307200
93301185 eugalt A Sept. 20, 2020, 4:53 a.m. OK Python 3 TESTS 83 109 307200
93300907 eugalt A Sept. 20, 2020, 4:47 a.m. OK Python 3 TESTS 83 109 307200
93300365 abpl1 A Sept. 20, 2020, 4:37 a.m. OK Python 3 TESTS 83 109 307200
93296637 sid_121212 A Sept. 20, 2020, 3:19 a.m. OK Python 3 TESTS 83 109 307200
93285571 ajpg307 A Sept. 19, 2020, 9:10 p.m. OK Python 3 TESTS 83 109 307200
93279074 Manas_Gupta_813 A Sept. 19, 2020, 7:18 p.m. OK Python 3 TESTS 83 109 307200
93276455 sh1194 A Sept. 19, 2020, 6:51 p.m. OK Python 3 TESTS 83 109 307200
93284862 eugalt A Sept. 19, 2020, 8:53 p.m. OK Python 3 TESTS 83 109 409600
93305188 printhelloworld A Sept. 20, 2020, 5:59 a.m. OK Python 3 TESTS 83 109 614400
93279736 BridgeBurner A Sept. 19, 2020, 7:26 p.m. OK Scala TESTS 83 498 0

remove filters

Back to search problems