Codeforces Round 573 (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
1190 Codeforces Round 573 (Div. 1) FINISHED False 7200 174497087 July 12, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6512 ) B Tokitsukaze, CSL and Stone Game PROGRAMMING games 1800

B'Tokitsukaze and CSL are playing a little game of stones. In the beginning, there are n piles of stones, the i -th pile of which has a_i stones. The two players take turns making moves. Tokitsukaze moves first. On each turn the player chooses a nonempty pile and removes exactly one stone from the pile. A player loses if all of the piles are empty before his turn, or if after removing the stone, two piles (possibly empty) contain the same number of stones. Supposing that both players play optimally, who will win the game? Consider an example: n=3 and sizes of piles are a_1=2 , a_2=3 , a_3=0 . It is impossible to choose the empty pile, so Tokitsukaze has two choices: the first and the second piles. If she chooses the first pile then the state will be [1, 3, 0] and it is a good move. But if she chooses the second pile then the state will be [2, 2, 0] and she immediately loses. So the only good move for her is to choose the first pile. Supposing that both players always take their best moves and never make mistakes, who will win the game? Note that even if there are two piles with the same number of stones at the beginning, Tokitsukaze may still be able to make a valid first move. It is only necessary that there are no two piles with the same number of stones after she moves. The first line contains a single integer n ( 1 <= n <= 10^5 ) -- the number of piles. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_1, a_2, ldots, a_n <= 10^9 ), which mean the i -th pile has a_i stones. Print "sjfnb" (without quotes) if Tokitsukaze will win, or "cslnb" (without quotes) if CSL will win. Note the output characters are case-sensitive. In the first example, Tokitsukaze cannot take any stone, so CSL will win. In the second example, Tokitsukaze can only take a stone from the first pile, and then, even though they have no stone, these two piles will have the same n'...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57826274 arounderstands B July 27, 2019, 3:18 a.m. OK Clang++17 Diagnostics TESTS 194 124 0 1800
56933516 fluffyowl B July 12, 2019, 4:27 p.m. OK D TESTS 189 93 11776000 1800
56899585 iica B July 12, 2019, 2:55 p.m. OK D TESTS 189 93 22528000 1800
61020528 nikhilreddy123 B Sept. 21, 2019, 2:28 p.m. OK GNU C11 TESTS 194 46 409600 1800
58907080 luogu_bot5 B Aug. 16, 2019, 11:37 a.m. OK GNU C++11 TESTS 194 31 204800 1800
58906403 luogu_bot1 B Aug. 16, 2019, 11:21 a.m. OK GNU C++11 TESTS 194 31 307200 1800
58906780 luogu_bot5 B Aug. 16, 2019, 11:30 a.m. OK GNU C++11 TESTS 194 31 307200 1800
58107353 luogu_bot5 B Aug. 1, 2019, 5:14 a.m. OK GNU C++11 TESTS 194 31 409600 1800
58172975 Orion545 B Aug. 2, 2019, 12:03 p.m. OK GNU C++11 TESTS 194 31 409600 1800
57359547 very_low B July 20, 2019, 7:19 a.m. OK GNU C++11 TESTS 194 31 409600 1800
57184203 qq892347252 B July 17, 2019, 8:12 a.m. OK GNU C++11 TESTS 194 31 409600 1800
56950916 ChthollyNotaSeniorious B July 13, 2019, 2:07 a.m. OK GNU C++11 TESTS 190 31 409600 1800
56917605 msuwakow B July 12, 2019, 3:39 p.m. OK GNU C++11 TESTS 189 31 409600 1800
60373302 zekrom_dream B Sept. 11, 2019, 4:30 a.m. OK GNU C++11 TESTS 194 31 409600 1800
68631013 Nson B Jan. 12, 2020, 2:49 a.m. OK GNU C++14 TESTS 194 46 409600 1800
61070143 Huyyt B Sept. 22, 2019, 12:27 p.m. OK GNU C++14 TESTS 194 46 409600 1800
59698690 Scut82 B Aug. 30, 2019, 9:41 a.m. OK GNU C++14 TESTS 194 46 409600 1800
57885122 Anadi B July 28, 2019, 9:29 a.m. OK GNU C++14 TESTS 194 46 409600 1800
57798581 x0000ai B July 26, 2019, 12:23 p.m. OK GNU C++14 TESTS 194 46 409600 1800
57302469 zhongzero B July 19, 2019, 1:17 a.m. OK GNU C++14 TESTS 194 46 409600 1800
57053701 wh2001_ZY B July 14, 2019, 4:32 p.m. OK GNU C++14 TESTS 194 46 409600 1800
56961750 MiricaMatei B July 13, 2019, 6:52 a.m. OK GNU C++14 TESTS 190 46 409600 1800
56960576 SoulTch B July 13, 2019, 6:26 a.m. OK GNU C++14 TESTS 190 46 409600 1800
64172909 bhaag_milkha B Nov. 3, 2019, 7:16 p.m. OK GNU C++14 TESTS 194 46 409600 1800
57557212 lesskreker B July 22, 2019, 8:35 p.m. OK GNU C++17 TESTS 194 31 409600 1800
59954519 _BARUTO B Sept. 3, 2019, 3:40 p.m. OK GNU C++17 TESTS 194 46 409600 1800
66634780 vjudge4 B Dec. 11, 2019, 12:31 p.m. OK GNU C++17 TESTS 194 46 409600 1800
64753586 vjudge2 B Nov. 12, 2019, 4:06 p.m. OK GNU C++17 TESTS 194 46 409600 1800
64752054 vjudge1 B Nov. 12, 2019, 3:35 p.m. OK GNU C++17 TESTS 194 46 409600 1800
64751197 vjudge3 B Nov. 12, 2019, 3:18 p.m. OK GNU C++17 TESTS 194 46 409600 1800
62426539 user202729_ B Oct. 12, 2019, 2:27 p.m. OK GNU C++17 TESTS 194 46 409600 1800
61562247 Jatana B Sept. 30, 2019, 3:58 p.m. OK GNU C++17 TESTS 194 46 409600 1800
59109569 Oom B Aug. 19, 2019, 7:44 p.m. OK GNU C++17 TESTS 194 46 409600 1800
58943424 SegmentationRight B Aug. 17, 2019, 7:54 a.m. OK GNU C++17 TESTS 194 46 409600 1800
57738626 hoangtl B July 25, 2019, 10:44 a.m. OK Go TESTS 194 62 4505600 1800
61867796 sighduck B Oct. 4, 2019, 5:06 p.m. OK Go TESTS 194 124 4505600 1800
61709872 holeguma B Oct. 2, 2019, 11:11 a.m. OK Java 8 TESTS 194 139 0 1800
57013409 Nutella3000 B July 14, 2019, 10:27 a.m. OK Java 8 TESTS 194 139 0 1800
56906922 Musin B July 12, 2019, 3:12 p.m. OK Java 8 TESTS 189 140 0 1800
56903198 dalt B July 12, 2019, 3:03 p.m. OK Java 8 TESTS 189 140 0 1800
56898692 niyaznigmatul B July 12, 2019, 2:53 p.m. OK Java 8 TESTS 189 140 0 1800
61704457 vjudge3 B Oct. 2, 2019, 9:35 a.m. OK Java 8 TESTS 194 155 0 1800
57642425 tryptophan B July 24, 2019, 1:04 p.m. OK Java 8 TESTS 194 155 0 1800
57949196 harry1995 B July 29, 2019, 3:40 p.m. OK Java 8 TESTS 194 156 409600 1800
57755833 7dan B July 25, 2019, 4:15 p.m. OK Java 8 TESTS 194 171 0 1800
57141989 Taran_1407 B July 16, 2019, 11:28 a.m. OK Java 8 TESTS 194 171 0 1800
56901201 wu_qing B July 12, 2019, 2:59 p.m. OK Kotlin TESTS 189 296 6553600 1800
56906131 eki B July 12, 2019, 3:10 p.m. OK Mono C# TESTS 189 109 11776000 1800
64777831 vjudge2 B Nov. 13, 2019, 5:36 a.m. OK MS C++ TESTS 194 31 409600 1800
56901664 tang0404 B July 12, 2019, 3 p.m. OK MS C++ TESTS 189 46 409600 1800
65573329 vjudge4 B Nov. 23, 2019, 8:34 a.m. OK MS C++ TESTS 194 46 819200 1800
58430190 vjudge3 B Aug. 7, 2019, 11:32 a.m. OK MS C++ TESTS 194 46 819200 1800
64525550 vjudge4 B Nov. 8, 2019, 1:41 p.m. OK MS C++ TESTS 194 46 819200 1800
64552271 vjudge2 B Nov. 9, 2019, 12:41 a.m. OK MS C++ TESTS 194 61 1638400 1800
58717112 vjudge5 B Aug. 13, 2019, 2:30 p.m. OK MS C++ TESTS 194 93 409600 1800
56974468 wRabbits_AlMag B July 13, 2019, 11:40 a.m. OK MS C++ TESTS 192 108 409600 1800
67260983 Gleb_Dubosarskii B Dec. 20, 2019, 3:26 a.m. OK MS C++ TESTS 194 139 6553600 1800
64760071 vjudge1 B Nov. 12, 2019, 6:42 p.m. OK MS C++ 2017 TESTS 194 46 921600 1800
56905742 Milanin B July 12, 2019, 3:09 p.m. OK MS C++ 2017 TESTS 189 61 409600 1800
59579244 j2v B Aug. 27, 2019, 3:19 p.m. OK MS C++ 2017 TESTS 194 61 409600 1800
63103425 YHHxBULIATANIA B Oct. 22, 2019, 2:44 a.m. OK MS C++ 2017 TESTS 194 62 409600 1800
56943066 hld67890 B July 12, 2019, 8:08 p.m. OK MS C++ 2017 TESTS 189 62 512000 1800
68312664 Still_Theory B Jan. 6, 2020, 11:55 a.m. OK MS C++ 2017 TESTS 194 109 819200 1800
58913960 Kaimo1412K B Aug. 16, 2019, 2:11 p.m. OK MS C++ 2017 TESTS 194 124 819200 1800
57013932 nik1998 B July 14, 2019, 10:42 a.m. OK MS C++ 2017 TESTS 194 124 5632000 1800
57013889 nik1998 B July 14, 2019, 10:41 a.m. OK MS C++ 2017 TESTS 194 156 5632000 1800
56906831 mandinga B July 12, 2019, 3:12 p.m. OK MS C++ 2017 TESTS 189 171 3993600 1800
58999019 yumtam B Aug. 18, 2019, 12:50 p.m. OK PyPy 2 TESTS 194 187 14848000 1800
56902188 pajenegod B July 12, 2019, 3:01 p.m. OK PyPy 2 TESTS 189 202 10547200 1800
57396631 thuutin B July 20, 2019, 4:05 p.m. OK PyPy 2 TESTS 194 202 13824000 1800
56901263 drd93 B July 12, 2019, 2:59 p.m. OK PyPy 2 TESTS 189 249 13209600 1800
57593045 bcollet B July 23, 2019, 12:55 p.m. OK PyPy 2 TESTS 194 264 8601600 1800
61958606 mridullgarg B Oct. 6, 2019, 6:44 a.m. OK PyPy 3 TESTS 194 249 10035200 1800
58510442 Theo_S B Aug. 9, 2019, 6:41 p.m. OK PyPy 3 TESTS 194 249 11878400 1800
60278034 ulyss B Sept. 8, 2019, 6:57 p.m. OK PyPy 3 TESTS 194 264 11366400 1800
56905762 CHelle B July 12, 2019, 3:09 p.m. OK PyPy 3 TESTS 189 265 11366400 1800
56899055 conqueror_of_tourist B July 12, 2019, 2:54 p.m. OK PyPy 3 TESTS 189 265 15564800 1800
57016538 vovosch B July 14, 2019, 11:53 a.m. OK PyPy 3 TESTS 194 265 15769600 1800
58146070 scheduler B Aug. 1, 2019, 9:25 p.m. OK PyPy 3 TESTS 194 280 15872000 1800
57010077 BenL B July 14, 2019, 8:45 a.m. OK PyPy 3 TESTS 193 296 14745600 1800
61705148 vjudge2 B Oct. 2, 2019, 9:48 a.m. OK PyPy 3 TESTS 194 296 15257600 1800
56914394 titia B July 12, 2019, 3:30 p.m. OK PyPy 3 TESTS 189 296 15360000 1800
56903796 nwi B July 12, 2019, 3:04 p.m. OK Python 2 TESTS 189 264 5632000 1800
57423538 Helli.code B July 20, 2019, 7:19 p.m. OK Python 2 TESTS 194 280 6451200 1800
56972658 SoSooding B July 13, 2019, 10:56 a.m. OK Python 2 TESTS 192 311 8806400 1800
63642269 a00920 B Oct. 28, 2019, 8:29 a.m. OK Python 3 TESTS 194 186 9830400 1800
59197516 nealzane B Aug. 21, 2019, 2:32 a.m. OK Python 3 TESTS 194 217 8499200 1800
57628261 SinKing B July 24, 2019, 7:51 a.m. OK Python 3 TESTS 194 217 8499200 1800
56988833 ahcub B July 13, 2019, 5:07 p.m. OK Python 3 TESTS 193 218 8499200 1800
57869483 whatshisbucket B July 28, 2019, 12:21 a.m. OK Python 3 TESTS 194 233 8499200 1800
56942500 llllllll B July 12, 2019, 7:50 p.m. OK Python 3 TESTS 189 248 8396800 1800
56996686 youness.amhaouch B July 13, 2019, 11:13 p.m. OK Python 3 TESTS 193 249 11673600 1800
59269297 Lancern B Aug. 22, 2019, 12:04 p.m. OK Rust TESTS 194 46 409600 1800
63035508 sansen B Oct. 20, 2019, 8:33 p.m. OK Rust TESTS 194 46 1638400 1800
56908950 tuna_salad B July 12, 2019, 3:16 p.m. OK Rust TESTS 189 46 1638400 1800
56901528 EbTech B July 12, 2019, 2:59 p.m. OK Rust TESTS 189 62 5529600 1800

remove filters

Back to search problems