Codeforces Round 666 (Div. 1)

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
1396 Codeforces Round 666 (Div. 1) FINISHED False 7200 138554711 Aug. 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11586 ) B Stoned Game PROGRAMMING brute force constructive algorithms games greedy

B'T is playing a game with his friend, HL. There are n piles of stones, the i -th pile initially has a_i stones. T and HL will take alternating turns, with T going first. In each turn, a player chooses a non-empty pile and then removes a single stone from it. However, one cannot choose a pile that has been chosen in the previous turn (the pile that was chosen by the other player, or if the current turn is the first turn then the player can choose any non-empty pile). The player who cannot choose a pile in his turn loses, and the game ends. Assuming both players play optimally, given the starting configuration of t games, determine the winner of each game. The first line of the input contains a single integer t (1 <= t <= 100) -- the number of games. The description of the games follows. Each description contains two lines: The first line contains a single integer n (1 <= n <= 100) -- the number of piles. The second line contains n integers a_1, a_2, ... , a_n (1 <= a_i <= 100) . For each game, print on a single line the name of the winner, "T" or "HL" (without quotes) In the first game, T removes a single stone from the only pile in his first turn. After that, although the pile still contains 1 stone, HL cannot choose from this pile because it has been chosen by T in the previous turn. Therefore, T is the winner. '...

Tutorials

Codeforces Round #666 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
91364662 Gassa B Aug. 30, 2020, 2:51 p.m. OK D TESTS 36 31 4812800
91445195 rainboy B Aug. 31, 2020, 12:34 a.m. OK GNU C11 TESTS 37 15 3788800
91402058 pengin_2000 B Aug. 30, 2020, 4 p.m. OK GNU C11 TESTS 36 202 3788800
91449569 Watson_2020 B Aug. 31, 2020, 2:46 a.m. OK GNU C++11 TESTS 37 15 3891200
91552937 froggyzhang B Sept. 1, 2020, 9:33 a.m. OK GNU C++11 TESTS 39 30 0
91496204 DestinHistoire B Aug. 31, 2020, 1:45 p.m. OK GNU C++11 TESTS 37 30 0
91647559 Refined_heart B Sept. 2, 2020, 2:06 p.m. OK GNU C++11 TESTS 39 30 0
91484095 _PaRz1VaL B Aug. 31, 2020, 11:05 a.m. OK GNU C++11 TESTS 37 30 3686400
91485662 Sky_Dreamer B Aug. 31, 2020, 11:27 a.m. OK GNU C++11 TESTS 37 30 3686400
91385730 coldiceh B Aug. 30, 2020, 3:30 p.m. OK GNU C++11 TESTS 36 30 3993600
91446990 Rainbow_sjy B Aug. 31, 2020, 1:40 a.m. OK GNU C++11 TESTS 37 30 3993600
91403401 Starry B Aug. 30, 2020, 4:03 p.m. OK GNU C++11 TESTS 36 30 3993600
91412746 z26y25 B Aug. 30, 2020, 4:21 p.m. OK GNU C++11 TESTS 36 30 3993600
91693900 unbelievable_aman B Sept. 3, 2020, 6:50 a.m. OK GNU C++14 TESTS 39 31 0
91666591 conan_0 B Sept. 2, 2020, 6:15 p.m. OK GNU C++14 TESTS 39 31 0
91662264 Jhamra B Sept. 2, 2020, 5:11 p.m. OK GNU C++14 TESTS 39 31 0
91635487 YuiHuang B Sept. 2, 2020, 11:25 a.m. OK GNU C++14 TESTS 39 31 0
91624905 shubhankarrr B Sept. 2, 2020, 8:37 a.m. OK GNU C++14 TESTS 39 31 0
91619745 masterVISHAL B Sept. 2, 2020, 7:13 a.m. OK GNU C++14 TESTS 39 31 0
91609735 pseudo-code B Sept. 2, 2020, 4:09 a.m. OK GNU C++14 TESTS 39 31 0
91607032 oipotato B Sept. 2, 2020, 2:48 a.m. OK GNU C++14 TESTS 39 31 0
91668317 sobhanbera B Sept. 2, 2020, 6:44 p.m. OK GNU C++14 TESTS 39 31 0
91704626 bnmd B Sept. 3, 2020, 9:35 a.m. OK GNU C++14 TESTS 39 31 0
91391434 luisBah B Aug. 30, 2020, 3:40 p.m. OK GNU C++17 TESTS 36 30 3788800
91649630 archelaus B Sept. 2, 2020, 2:30 p.m. OK GNU C++17 TESTS 39 31 0
91708462 Anish_Bashyal B Sept. 3, 2020, 10:33 a.m. OK GNU C++17 TESTS 39 31 0
91684062 feifeiko B Sept. 3, 2020, 3:24 a.m. OK GNU C++17 TESTS 39 31 0
91674026 mikigrubic B Sept. 2, 2020, 8:49 p.m. OK GNU C++17 TESTS 39 31 0
91667208 PointBlank B Sept. 2, 2020, 6:25 p.m. OK GNU C++17 TESTS 39 31 0
91660560 anhtaihsgs B Sept. 2, 2020, 4:46 p.m. OK GNU C++17 TESTS 39 31 0
91633987 UshanGhosh B Sept. 2, 2020, 11:04 a.m. OK GNU C++17 TESTS 39 31 0
91613068 varshatumburu B Sept. 2, 2020, 5:21 a.m. OK GNU C++17 TESTS 39 31 0
91602194 Ronnie007 B Sept. 1, 2020, 10:56 p.m. OK GNU C++17 TESTS 39 31 0
91506255 madhav_1999 B Aug. 31, 2020, 3:48 p.m. OK GNU C++17 (64) TESTS 37 15 0
91656926 Capitan B Sept. 2, 2020, 3:59 p.m. OK GNU C++17 (64) TESTS 39 30 0
91372613 Hyado B Aug. 30, 2020, 3:06 p.m. OK GNU C++17 (64) TESTS 36 30 4403200
91365249 ecnerwala B Aug. 30, 2020, 2:52 p.m. OK GNU C++17 (64) TESTS 36 30 4403200
91408910 lucifer1004 B Aug. 30, 2020, 4:13 p.m. OK GNU C++17 (64) TESTS 36 30 4403200
91372093 alimq B Aug. 30, 2020, 3:05 p.m. OK GNU C++17 (64) TESTS 36 30 4403200
91373603 Arpa B Aug. 30, 2020, 3:08 p.m. OK GNU C++17 (64) TESTS 36 30 4403200
91364588 353cerega B Aug. 30, 2020, 2:51 p.m. OK GNU C++17 (64) TESTS 36 30 5222400
91387266 UP_BOND B Aug. 30, 2020, 3:32 p.m. OK GNU C++17 (64) TESTS 36 30 8396800
91696308 I3J03RN B Sept. 3, 2020, 7:29 a.m. OK GNU C++17 (64) TESTS 39 31 0
91448349 synapse B Aug. 31, 2020, 2:16 a.m. OK Go TESTS 37 46 10752000
91367610 clyring B Aug. 30, 2020, 2:56 p.m. OK Haskell TESTS 36 46 11673600
91676184 dawangk B Sept. 2, 2020, 9:58 p.m. OK Java 11 TESTS 39 171 0
91445133 skittles1412 B Aug. 31, 2020, 12:30 a.m. OK Java 11 TESTS 37 186 25088000
91404603 idk321 B Aug. 30, 2020, 4:05 p.m. OK Java 11 TESTS 36 187 23859200
91434944 Apfeloxid B Aug. 30, 2020, 7:29 p.m. OK Java 11 TESTS 37 187 24268800
91381040 awesomelemonade B Aug. 30, 2020, 3:21 p.m. OK Java 11 TESTS 36 202 23859200
91371158 PizzaLovers007 B Aug. 30, 2020, 3:03 p.m. OK Java 11 TESTS 36 202 23859200
91367440 uwi B Aug. 30, 2020, 2:56 p.m. OK Java 11 TESTS 36 202 24064000
91685991 tragiangvu B Sept. 3, 2020, 4:16 a.m. OK Java 11 TESTS 39 218 0
91580909 trungnv280201 B Sept. 1, 2020, 3:46 p.m. OK Java 11 TESTS 39 218 0
91385735 mphillotry B Aug. 30, 2020, 3:30 p.m. OK Java 11 TESTS 36 218 23859200
91610753 MagentaCobra B Sept. 2, 2020, 4:34 a.m. OK Java 8 TESTS 39 109 0
91437185 TriumphantEggplant B Aug. 30, 2020, 8:03 p.m. OK Java 8 TESTS 37 109 20480000
91376254 robinz62 B Aug. 30, 2020, 3:13 p.m. OK Java 8 TESTS 36 109 20480000
91434908 golions B Aug. 30, 2020, 7:29 p.m. OK Java 8 TESTS 37 109 20787200
91565046 sudhanshu_lucky B Sept. 1, 2020, 12:34 p.m. OK Java 8 TESTS 39 124 0
91563004 Mohammad_Abohasan B Sept. 1, 2020, 12:04 p.m. OK Java 8 TESTS 39 124 0
91529726 AayushICS B Sept. 1, 2020, 1:15 a.m. OK Java 8 TESTS 39 124 0
91513894 AnandOza B Aug. 31, 2020, 5:30 p.m. OK Java 8 TESTS 37 124 0
91512890 pulkit14 B Aug. 31, 2020, 5:15 p.m. OK Java 8 TESTS 37 124 0
91392519 xwchen B Aug. 30, 2020, 3:42 p.m. OK Java 8 TESTS 36 124 20480000
91615594 Spheniscine B Sept. 2, 2020, 6:06 a.m. OK Kotlin TESTS 39 140 512000
91565316 koboshi B Sept. 1, 2020, 12:39 p.m. OK Kotlin TESTS 39 155 512000
91388809 batkhuyag B Aug. 30, 2020, 3:35 p.m. OK Kotlin TESTS 36 155 21811200
91375123 Hakiobo B Aug. 30, 2020, 3:11 p.m. OK Kotlin TESTS 36 155 22323200
91377137 Tlatoani B Aug. 30, 2020, 3:14 p.m. OK Kotlin TESTS 36 155 22937600
91615352 Spheniscine B Sept. 2, 2020, 6:02 a.m. OK Kotlin TESTS 39 280 614400
91412064 mban259 B Aug. 30, 2020, 4:20 p.m. OK Mono C# TESTS 36 62 13004800
91406856 Yupiteru B Aug. 30, 2020, 4:09 p.m. OK Mono C# TESTS 36 77 12697600
91408978 azukun B Aug. 30, 2020, 4:13 p.m. OK Mono C# TESTS 36 92 12902400
91565427 terry_u16 B Sept. 1, 2020, 12:40 p.m. OK Mono C# TESTS 39 155 4505600
91431594 reikiriyama B Aug. 30, 2020, 6:46 p.m. OK MS C++ 2017 TESTS 37 31 3788800
91373761 shirowa B Aug. 30, 2020, 3:08 p.m. OK MS C++ 2017 TESTS 36 31 3993600
91378805 Catmoonlight B Aug. 30, 2020, 3:17 p.m. OK MS C++ 2017 TESTS 36 46 3788800
91388635 ialakhtin B Aug. 30, 2020, 3:35 p.m. OK MS C++ 2017 TESTS 36 46 3788800
91373428 Friska B Aug. 30, 2020, 3:07 p.m. OK MS C++ 2017 TESTS 36 46 4198400
91403937 AnnSuperstar B Aug. 30, 2020, 4:04 p.m. OK MS C++ 2017 TESTS 36 62 3788800
91395266 vpike B Aug. 30, 2020, 3:47 p.m. OK MS C++ 2017 TESTS 36 62 3788800
91379490 Gravekper B Aug. 30, 2020, 3:18 p.m. OK MS C++ 2017 TESTS 36 311 3788800
91383368 zacker-22 B Aug. 30, 2020, 3:25 p.m. OK PyPy 2 TESTS 36 109 23552000
91370708 alexwice B Aug. 30, 2020, 3:02 p.m. OK PyPy 2 TESTS 36 140 24780800
91438787 throwawayatcoder B Aug. 30, 2020, 8:35 p.m. OK PyPy 3 TESTS 37 140 21811200
91371222 qwertz73355a B Aug. 30, 2020, 3:03 p.m. OK PyPy 3 TESTS 36 140 21913600
91512806 Haaki729 B Aug. 31, 2020, 5:14 p.m. OK PyPy 3 TESTS 37 155 1433600
91675457 Tadek B Sept. 2, 2020, 9:32 p.m. OK PyPy 3 TESTS 39 155 1536000
91658966 meakshaymishra B Sept. 2, 2020, 4:25 p.m. OK PyPy 3 TESTS 39 155 1536000
91656441 pk31299 B Sept. 2, 2020, 3:53 p.m. OK PyPy 3 TESTS 39 155 1536000
91637218 Pshukla2000 B Sept. 2, 2020, 11:49 a.m. OK PyPy 3 TESTS 39 155 1536000
91536520 a8sh3s B Sept. 1, 2020, 5 a.m. OK PyPy 3 TESTS 39 155 1536000
91670110 shubham_pandey B Sept. 2, 2020, 7:16 p.m. OK PyPy 3 TESTS 39 155 1638400
91564363 tamato B Sept. 1, 2020, 12:23 p.m. OK PyPy 3 TESTS 39 155 1638400
91419979 nwi B Aug. 30, 2020, 4:34 p.m. OK Python 2 TESTS 36 171 6656000
91456514 yltx B Aug. 31, 2020, 4:52 a.m. OK Python 3 TESTS 37 93 6758400
91643479 navalpangtey474 B Sept. 2, 2020, 1:14 p.m. OK Python 3 TESTS 39 109 0
91571910 -Roronoa_Zoro- B Sept. 1, 2020, 2:02 p.m. OK Python 3 TESTS 39 109 0
91556315 Fazil_Ahmed B Sept. 1, 2020, 10:26 a.m. OK Python 3 TESTS 39 109 0
91498170 sushmanth.dampur8780 B Aug. 31, 2020, 2:09 p.m. OK Python 3 TESTS 37 109 0
91479247 mkawa2 B Aug. 31, 2020, 9:56 a.m. OK Python 3 TESTS 37 109 6963200
91386000 _andyli B Aug. 30, 2020, 3:30 p.m. OK Python 3 TESTS 36 109 8089600
91696886 saurav873 B Sept. 3, 2020, 7:37 a.m. OK Python 3 TESTS 39 124 0
91603852 Smriti_123 B Sept. 2, 2020, 12:25 a.m. OK Python 3 TESTS 39 124 307200
91396893 morio__ B Aug. 30, 2020, 3:50 p.m. OK Python 3 TESTS 36 124 6860800
91423681 EbTech B Aug. 30, 2020, 5:48 p.m. OK Rust TESTS 37 31 3891200
91369208 tuna_salad B Aug. 30, 2020, 2:59 p.m. OK Rust TESTS 36 31 3891200
91695566 Strorkis B Sept. 3, 2020, 7:17 a.m. OK Rust TESTS 39 46 0
91580219 kenkoooo B Sept. 1, 2020, 3:38 p.m. OK Rust TESTS 39 46 0
91397447 cympfh B Aug. 30, 2020, 3:51 p.m. OK Rust TESTS 36 46 3891200

remove filters

Back to search problems