Codeforces Global Round 8

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
1368 Codeforces Global Round 8 FINISHED False 9000 139331699 June 18, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1050 ) F Lamps on a Circle PROGRAMMING games greedy implementation interactive math

B"This is an interactive problem. John and his imaginary friend play a game. There are n lamps arranged in a circle. Lamps are numbered 1 through n in clockwise order, that is, lamps i and i + 1 are adjacent for any i = 1, ldots, n - 1 , and also lamps n and 1 are adjacent. Initially all lamps are turned off. John and his friend take turns, with John moving first. On his turn John can choose to terminate the game, or to make a move. To make a move, John can choose any positive number k and turn any k lamps of his choosing on. In response to this move, John's friend will choose k consecutive lamps and turn all of them off (the lamps in the range that were off before this move stay off). Note that the value of k is the same as John's number on his last move. For example, if n = 5 and John have just turned three lamps on, John's friend may choose to turn off lamps 1, 2, 3 , or 2, 3, 4 , or 3, 4, 5 , or 4, 5, 1 , or 5, 1, 2 . After this, John may choose to terminate or move again, and so on. However, John can not make more than 10^4 moves. John wants to maximize the number of lamps turned on at the end of the game, while his friend wants to minimize this number. Your task is to provide a strategy for John to achieve optimal result. Your program will play interactively for John against the jury's interactor program playing for John's friend. Suppose there are n lamps in the game. Let R(n) be the number of turned on lamps at the end of the game if both players act optimally. Your program has to terminate the game with at least R(n) turned on lamps within 10^4 moves. Refer to Interaction section below for interaction details. For technical reasons hacks for this problem are disabled. Initially your program will be fed a single integer n ( 1 <= q n <= q 1000 ) -- the number of lamps in the game. Then the interactor will wai"...

Tutorials

Codeforces Global Round 8: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
84227362 Gassa F June 18, 2020, 4:04 p.m. OK D TESTS 45 46 4198400
84231816 hos.lyric F June 18, 2020, 4:14 p.m. OK D TESTS 45 62 4198400
84271162 xyz32768 F June 18, 2020, 7:30 p.m. OK GNU C++11 TESTS 45 31 0
84245323 shenxy13 F June 18, 2020, 4:45 p.m. OK GNU C++11 TESTS 45 31 0
84282623 xay5421 F June 19, 2020, 1:16 a.m. OK GNU C++11 TESTS 45 31 0
84275437 David_Garcia F June 18, 2020, 8:51 p.m. OK GNU C++11 TESTS 45 31 0
84253713 yao11617 F June 18, 2020, 5:04 p.m. OK GNU C++11 TESTS 45 31 102400
84255668 Rainer1116 F June 18, 2020, 5:09 p.m. OK GNU C++11 TESTS 45 31 307200
84241506 albertg F June 18, 2020, 4:35 p.m. OK GNU C++11 TESTS 45 31 307200
84288416 18380120126 F June 19, 2020, 4:03 a.m. OK GNU C++11 TESTS 45 31 2457600
84289159 lwOvO F June 19, 2020, 4:17 a.m. OK GNU C++11 TESTS 45 46 0
84285949 MelonMeow_ylh F June 19, 2020, 3:05 a.m. OK GNU C++11 TESTS 45 46 0
84266706 hey_boris F June 18, 2020, 6:33 p.m. OK GNU C++14 TESTS 45 46 0
84287851 apiadu F June 19, 2020, 3:52 a.m. OK GNU C++14 TESTS 45 46 0
84282890 felipe.fcw F June 19, 2020, 1:27 a.m. OK GNU C++14 TESTS 45 46 0
84280704 SuperJ6 F June 18, 2020, 11:52 p.m. OK GNU C++14 TESTS 45 46 0
84274959 sargun99 F June 18, 2020, 8:40 p.m. OK GNU C++14 TESTS 45 46 0
84256158 sonya123 F June 18, 2020, 5:09 p.m. OK GNU C++14 TESTS 45 46 0
84245842 ardan F June 18, 2020, 4:46 p.m. OK GNU C++14 TESTS 45 46 0
84292213 Maripium F June 19, 2020, 5:17 a.m. OK GNU C++14 TESTS 45 46 204800
84281861 tzaph_ F June 19, 2020, 12:42 a.m. OK GNU C++14 TESTS 45 46 204800
84272649 pikmike F June 18, 2020, 7:54 p.m. OK GNU C++14 TESTS 45 46 204800
84268062 eisen_shinzou F June 18, 2020, 6:44 p.m. OK GNU C++17 TESTS 45 31 0
84260795 Amoo_Safar F June 18, 2020, 5:56 p.m. OK GNU C++17 TESTS 45 31 0
84245892 Um_nik F June 18, 2020, 4:46 p.m. OK GNU C++17 TESTS 45 31 0
84218598 SPatrik F June 18, 2020, 3:47 p.m. OK GNU C++17 TESTS 45 31 0
84248044 TheScrasse F June 18, 2020, 4:51 p.m. OK GNU C++17 TESTS 45 31 102400
84285387 gs18115 F June 19, 2020, 2:51 a.m. OK GNU C++17 TESTS 45 31 204800
84254339 Seicchi_28 F June 18, 2020, 5:06 p.m. OK GNU C++17 TESTS 45 31 204800
84242815 mzy123 F June 18, 2020, 4:38 p.m. OK GNU C++17 TESTS 45 31 204800
84237722 SirShokoladina F June 18, 2020, 4:27 p.m. OK GNU C++17 TESTS 45 31 204800
84220981 Thienu F June 18, 2020, 3:51 p.m. OK GNU C++17 TESTS 45 31 204800
84232704 nuip F June 18, 2020, 4:16 p.m. OK GNU C++17 (64) TESTS 45 31 0
84286648 Toxel F June 19, 2020, 3:24 a.m. OK GNU C++17 (64) TESTS 45 31 0
84271374 emthrm F June 18, 2020, 7:33 p.m. OK GNU C++17 (64) TESTS 45 31 0
84261578 chctxdy68 F June 18, 2020, 6 p.m. OK GNU C++17 (64) TESTS 45 31 0
84248391 fuppy F June 18, 2020, 4:52 p.m. OK GNU C++17 (64) TESTS 45 31 0
84244642 hitonanode F June 18, 2020, 4:43 p.m. OK GNU C++17 (64) TESTS 45 31 0
84238642 ollpu F June 18, 2020, 4:29 p.m. OK GNU C++17 (64) TESTS 45 31 0
84222474 zeus_orz F June 18, 2020, 3:54 p.m. OK GNU C++17 (64) TESTS 45 31 0
84269379 lsantire F June 18, 2020, 7:01 p.m. OK GNU C++17 (64) TESTS 45 31 102400
84276543 MrDecomposition F June 18, 2020, 9:16 p.m. OK GNU C++17 (64) TESTS 45 31 10035200
84290916 ritik_16 F June 19, 2020, 4:49 a.m. OK Java 11 TESTS 45 202 0
84277533 nthistle F June 18, 2020, 9:42 p.m. OK Java 11 TESTS 45 202 0
84238714 eatmore F June 18, 2020, 4:29 p.m. OK Java 11 TESTS 45 218 0
84231123 uwi F June 18, 2020, 4:12 p.m. OK Java 11 TESTS 45 248 307200
84262770 Lewin F June 18, 2020, 6:10 p.m. OK Java 11 TESTS 45 249 0
84291079 ritik_16 F June 19, 2020, 4:52 a.m. OK Java 11 TESTS 45 326 204800
84232166 Oopsimbad F June 18, 2020, 4:14 p.m. OK Java 11 TESTS 45 327 0
84249503 cwise F June 18, 2020, 4:55 p.m. OK Java 8 TESTS 45 140 19763200
84278301 RohanC F June 18, 2020, 10:06 p.m. OK Java 8 TESTS 45 202 0
84267065 AnandOza F June 18, 2020, 6:35 p.m. OK Java 8 TESTS 45 202 0
84266810 lucasr F June 18, 2020, 6:34 p.m. OK Java 8 TESTS 45 202 0
84254537 Magikarp1 F June 18, 2020, 5:06 p.m. OK Java 8 TESTS 45 202 0
84291098 ritik_16 F June 19, 2020, 4:52 a.m. OK Java 8 TESTS 45 233 0
84269449 AnandOza F June 18, 2020, 7:02 p.m. OK Java 8 TESTS 45 233 0
84256195 Hakiobo F June 18, 2020, 5:10 p.m. OK Kotlin TESTS 45 171 512000
84252561 jonas.havelka.42 F June 18, 2020, 5:02 p.m. OK Kotlin TESTS 45 202 614400
84248249 batkhuyag F June 18, 2020, 4:52 p.m. OK Kotlin TESTS 45 311 1638400
84226753 chokudai F June 18, 2020, 4:03 p.m. OK Mono C# TESTS 45 77 1945600
84228394 keymoon F June 18, 2020, 4:06 p.m. OK Mono C# TESTS 45 124 6860800
84256574 r57shell F June 18, 2020, 5:10 p.m. OK MS C++ TESTS 45 46 0
84235179 Pasqual45 F June 18, 2020, 4:21 p.m. OK MS C++ 2017 TESTS 45 46 0
84237029 Baharevim F June 18, 2020, 4:25 p.m. OK MS C++ 2017 TESTS 45 61 0
84271208 pichulia F June 18, 2020, 7:30 p.m. OK MS C++ 2017 TESTS 45 186 819200
84228436 kclee2172 F June 18, 2020, 4:06 p.m. OK PyPy 3 TESTS 45 202 2150400
84248507 CKP_ F June 18, 2020, 4:52 p.m. OK PyPy 3 TESTS 45 265 4915200
84291316 HYPERHYPERHYPERCUBELOVER F June 19, 2020, 4:56 a.m. OK PyPy 3 TESTS 45 280 4403200
84289145 liouzhou_101 F June 19, 2020, 4:17 a.m. OK PyPy 3 TESTS 45 280 5836800
84255874 nwi F June 18, 2020, 5:09 p.m. OK Python 2 TESTS 45 265 102400
84269233 sh1194 F June 18, 2020, 6:59 p.m. OK Python 3 TESTS 45 155 409600
84268965 sh1194 F June 18, 2020, 6:56 p.m. OK Python 3 TESTS 45 171 409600
84235045 Kiri8128 F June 18, 2020, 4:21 p.m. OK Python 3 TESTS 45 171 409600
84269169 sh1194 F June 18, 2020, 6:58 p.m. OK Python 3 TESTS 45 187 409600
84272933 robostac F June 18, 2020, 8 p.m. OK Rust TESTS 45 77 307200
84272812 robostac F June 18, 2020, 7:57 p.m. OK Rust TESTS 45 1434 307200

remove filters

Back to search problems