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 |
---|---|---|---|---|---|---|
1237 | Codeforces Global Round 5 | FINISHED | False | 9000 | 166202687 | Oct. 16, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4290 ) | D | Balanced Playlist | PROGRAMMING | binary search data structures implementation | 1900 |
B'Your favorite music streaming platform has formed a perfectly balanced playlist exclusively for you. The playlist consists of n tracks numbered from 1 to n . The playlist is automatic and cyclic: whenever track i finishes playing, track i+1 starts playing automatically; after track n goes track 1 . For each track i , you have estimated its coolness a_i . The higher a_i is, the cooler track i is. Every morning, you choose a track. The playlist then starts playing from this track in its usual cyclic fashion. At any moment, you remember the maximum coolness x of already played tracks. Once you hear that a track with coolness strictly less than frac{x}{2} (no rounding) starts playing, you turn off the music immediately to keep yourself in a good mood. For each track i , find out how many tracks you will listen to before turning off the music if you start your morning with track i , or determine that you will never turn the music off. Note that if you listen to the same track several times, every time must be counted. The first line contains a single integer n ( 2 <= n <= 10^5 ), denoting the number of tracks in the playlist. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ), denoting coolnesses of the tracks. Output n integers c_1, c_2, ldots, c_n , where c_i is either the number of tracks you will listen to if you start listening from track i or -1 if you will be listening to music indefinitely. In the first example, here is what will happen if you start with... In the second example, if you start with track 4 , you will listen to track 4 , listen to track 1 , listen to track 2 , listen to track 3 , listen to track 4 again, listen to track 1 again, and stop as a_2 < frac{max(a_4, a_1, a_2, a_3, a_4, a_1)}{2} . Note that both track 1 and tr'... |
T |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
62713079 | Gassa | D | Oct. 16, 2019, 3:44 p.m. | OK | D | TESTS | 57 | 93 | 11571200 | 1900 | |
62723180 | iica | D | Oct. 16, 2019, 4:26 p.m. | OK | D | TESTS | 57 | 109 | 36249600 | 1900 | |
66248427 | rr_ | D | Dec. 3, 2019, 10:29 p.m. | OK | D | TESTS | 57 | 124 | 22425600 | 1900 | |
62740841 | rainboy | D | Oct. 16, 2019, 7:42 p.m. | OK | GNU C11 | TESTS | 57 | 373 | 1228800 | 1900 | |
62714109 | Chipe1 | D | Oct. 16, 2019, 3:48 p.m. | OK | GNU C11 | TESTS | 57 | 405 | 5222400 | 1900 | |
62724064 | codeplay0314 | D | Oct. 16, 2019, 4:30 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 3072000 | 1900 | |
62900213 | BeNoble | D | Oct. 19, 2019, 3:43 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 3174400 | 1900 | |
62751850 | Echo6342 | D | Oct. 17, 2019, 1:55 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 4812800 | 1900 | |
63298187 | cjrhahahahaha | D | Oct. 24, 2019, 1:32 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 4812800 | 1900 | |
62757196 | luogu_bot5 | D | Oct. 17, 2019, 5:19 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 4812800 | 1900 | |
62809885 | zjf_juruo | D | Oct. 17, 2019, 3:05 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 4915200 | 1900 | |
62875807 | luogu_bot5 | D | Oct. 18, 2019, 3:16 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 5734400 | 1900 | |
62875817 | zyn_615 | D | Oct. 18, 2019, 3:17 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 5734400 | 1900 | |
62704968 | QAQAutoMaton | D | Oct. 16, 2019, 3:18 p.m. | OK | GNU C++11 | TESTS | 57 | 46 | 9830400 | 1900 | |
62930959 | niupple | D | Oct. 19, 2019, 12:42 p.m. | OK | GNU C++11 | TESTS | 57 | 61 | 2355200 | 1900 | |
62877983 | BeNoble | D | Oct. 18, 2019, 3:55 p.m. | OK | GNU C++14 | TESTS | 57 | 46 | 3379200 | 1900 | |
62719001 | buko | D | Oct. 16, 2019, 4:08 p.m. | OK | GNU C++14 | TESTS | 57 | 62 | 1331200 | 1900 | |
67144426 | KisekiPurin2019 | D | Dec. 18, 2019, 8:12 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 1843200 | 1900 | |
67588270 | vampire_slayer | D | Dec. 25, 2019, 9:06 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 1945600 | 1900 | |
62750867 | melancholic_fat_otaku | D | Oct. 17, 2019, 1:05 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2048000 | 1900 | |
62712708 | halfblindprince | D | Oct. 16, 2019, 3:43 p.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2355200 | 1900 | |
62756501 | iefnah06 | D | Oct. 17, 2019, 4:59 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2457600 | 1900 | |
63437078 | singhpankaj079 | D | Oct. 26, 2019, 10:59 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2457600 | 1900 | |
63085583 | TShT | D | Oct. 21, 2019, 4:30 p.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2457600 | 1900 | |
62871620 | IPX-243 | D | Oct. 18, 2019, 1:57 p.m. | OK | GNU C++14 | TESTS | 57 | 62 | 2764800 | 1900 | |
62715247 | whyando | D | Oct. 16, 2019, 3:52 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 1740800 | 1900 | |
62719122 | Cro-Marmot | D | Oct. 16, 2019, 4:08 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 1843200 | 1900 | |
63266789 | gina0605 | D | Oct. 24, 2019, 12:52 a.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2048000 | 1900 | |
62704041 | jiangly | D | Oct. 16, 2019, 3:15 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2252800 | 1900 | |
62704419 | hank55663 | D | Oct. 16, 2019, 3:16 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2457600 | 1900 | |
62781177 | _SW | D | Oct. 17, 2019, 12:57 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2457600 | 1900 | |
62855705 | aman_9875 | D | Oct. 18, 2019, 9:09 a.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2867200 | 1900 | |
62820376 | wish2lucky | D | Oct. 17, 2019, 4:32 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 3072000 | 1900 | |
66793876 | TD06 | D | Dec. 13, 2019, 4:17 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 3072000 | 1900 | |
62718998 | RCG | D | Oct. 16, 2019, 4:08 p.m. | OK | GNU C++17 | TESTS | 57 | 62 | 3174400 | 1900 | |
63969631 | synapse | D | Nov. 1, 2019, 8:36 a.m. | OK | Go | TESTS | 57 | 124 | 9625600 | 1900 | |
68716796 | vjudge5 | D | Jan. 13, 2020, 2:46 p.m. | OK | Go | TESTS | 57 | 124 | 10752000 | 1900 | |
63978298 | synapse | D | Nov. 1, 2019, 9:18 a.m. | OK | Go | TESTS | 57 | 124 | 10854400 | 1900 | |
64646181 | winee | D | Nov. 10, 2019, 3:04 p.m. | OK | Java 11 | TESTS | 57 | 436 | 15974400 | 1900 | |
64354919 | IslamTalipovTop | D | Nov. 6, 2019, 9:50 a.m. | OK | Java 11 | TESTS | 57 | 841 | 36659200 | 1900 | |
62764936 | prem_cse | D | Oct. 17, 2019, 8:18 a.m. | OK | Java 8 | TESTS | 57 | 170 | 2662400 | 1900 | |
63957958 | thisbeit | D | Nov. 1, 2019, 3:16 a.m. | OK | Java 8 | TESTS | 57 | 171 | 0 | 1900 | |
62710489 | eatmore | D | Oct. 16, 2019, 3:35 p.m. | OK | Java 8 | TESTS | 57 | 171 | 2560000 | 1900 | |
62832395 | bking11 | D | Oct. 17, 2019, 8:25 p.m. | OK | Java 8 | TESTS | 57 | 187 | 5222400 | 1900 | |
62764695 | polyakoff | D | Oct. 17, 2019, 8:13 a.m. | OK | Java 8 | TESTS | 57 | 202 | 3891200 | 1900 | |
63852409 | yaoct | D | Oct. 30, 2019, 4:12 p.m. | OK | Java 8 | TESTS | 57 | 202 | 5632000 | 1900 | |
62902250 | aman28rwt | D | Oct. 19, 2019, 4:36 a.m. | OK | Java 8 | TESTS | 57 | 202 | 13721600 | 1900 | |
62820851 | IDzekh | D | Oct. 17, 2019, 4:47 p.m. | OK | Java 8 | TESTS | 57 | 218 | 6041600 | 1900 | |
62731822 | brainfxxk | D | Oct. 16, 2019, 5:03 p.m. | OK | Java 8 | TESTS | 57 | 233 | 0 | 1900 | |
62736706 | bhautik_77 | D | Oct. 16, 2019, 6:33 p.m. | OK | Java 8 | TESTS | 57 | 249 | 47616000 | 1900 | |
62727960 | knightL | D | Oct. 16, 2019, 4:47 p.m. | OK | Kotlin | TESTS | 57 | 638 | 11673600 | 1900 | |
62703994 | Tlatoani | D | Oct. 16, 2019, 3:15 p.m. | OK | Kotlin | TESTS | 57 | 1154 | 19763200 | 1900 | |
62712355 | darnley | D | Oct. 16, 2019, 3:42 p.m. | OK | Kotlin | TESTS | 57 | 1996 | 9728000 | 1900 | |
62716125 | azukun | D | Oct. 16, 2019, 3:56 p.m. | OK | Mono C# | TESTS | 57 | 124 | 24473600 | 1900 | |
64849070 | m1_k3 | D | Nov. 13, 2019, 6:45 p.m. | OK | Mono C# | TESTS | 57 | 140 | 14643200 | 1900 | |
64629684 | m1_k3 | D | Nov. 10, 2019, 9:43 a.m. | OK | Mono C# | TESTS | 57 | 155 | 15052800 | 1900 | |
64631509 | m1_k3 | D | Nov. 10, 2019, 10:18 a.m. | OK | Mono C# | TESTS | 57 | 155 | 15052800 | 1900 | |
62780597 | omikad | D | Oct. 17, 2019, 12:48 p.m. | OK | Mono C# | TESTS | 57 | 155 | 20377600 | 1900 | |
64658604 | m1_k3 | D | Nov. 10, 2019, 8:05 p.m. | OK | Mono C# | TESTS | 57 | 186 | 21504000 | 1900 | |
62708693 | riantkb | D | Oct. 16, 2019, 3:29 p.m. | OK | Mono C# | TESTS | 57 | 186 | 24064000 | 1900 | |
64627634 | m1_k3 | D | Nov. 10, 2019, 9:03 a.m. | OK | Mono C# | TESTS | 57 | 311 | 16896000 | 1900 | |
64626597 | m1_k3 | D | Nov. 10, 2019, 8:43 a.m. | OK | Mono C# | TESTS | 57 | 624 | 32051200 | 1900 | |
62761561 | vjudge2 | D | Oct. 17, 2019, 7:03 a.m. | OK | MS C++ | TESTS | 57 | 62 | 3891200 | 1900 | |
62724541 | tarattata1 | D | Oct. 16, 2019, 4:32 p.m. | OK | MS C++ | TESTS | 57 | 77 | 3584000 | 1900 | |
63366416 | vjudge2 | D | Oct. 25, 2019, 7:40 a.m. | OK | MS C++ | TESTS | 57 | 93 | 3584000 | 1900 | |
68115671 | vjudge2 | D | Jan. 3, 2020, 11:22 a.m. | OK | MS C++ | TESTS | 57 | 264 | 12902400 | 1900 | |
68104046 | vjudge3 | D | Jan. 3, 2020, 5:54 a.m. | OK | MS C++ | TESTS | 57 | 265 | 11673600 | 1900 | |
68101540 | vjudge5 | D | Jan. 3, 2020, 3:35 a.m. | OK | MS C++ | TESTS | 57 | 265 | 12083200 | 1900 | |
68077079 | vjudge2 | D | Jan. 2, 2020, 12:59 p.m. | OK | MS C++ | TESTS | 57 | 265 | 12083200 | 1900 | |
68104023 | vjudge5 | D | Jan. 3, 2020, 5:53 a.m. | OK | MS C++ | TESTS | 57 | 280 | 12083200 | 1900 | |
62731580 | pichulia | D | Oct. 16, 2019, 5:02 p.m. | OK | MS C++ 2017 | TESTS | 57 | 109 | 2662400 | 1900 | |
62730524 | P___ | D | Oct. 16, 2019, 4:58 p.m. | OK | MS C++ 2017 | TESTS | 57 | 109 | 8396800 | 1900 | |
63923191 | gs11008 | D | Oct. 31, 2019, 12:19 p.m. | OK | MS C++ 2017 | TESTS | 57 | 171 | 5222400 | 1900 | |
62712254 | dkyun | D | Oct. 16, 2019, 3:42 p.m. | OK | MS C++ 2017 | TESTS | 57 | 187 | 7065600 | 1900 | |
62722647 | Stresshoover | D | Oct. 16, 2019, 4:23 p.m. | OK | MS C++ 2017 | TESTS | 57 | 202 | 7168000 | 1900 | |
67542778 | wp32pw | D | Dec. 24, 2019, 3:34 p.m. | OK | MS C++ 2017 | TESTS | 57 | 264 | 6041600 | 1900 | |
62756473 | lonely_moon | D | Oct. 17, 2019, 4:58 a.m. | OK | MS C++ 2017 | TESTS | 57 | 295 | 35737600 | 1900 | |
62870085 | lokolo | D | Oct. 18, 2019, 1:30 p.m. | OK | MS C++ 2017 | TESTS | 57 | 311 | 11468800 | 1900 | |
62730830 | Ketovdk | D | Oct. 16, 2019, 4:59 p.m. | OK | MS C++ 2017 | TESTS | 57 | 342 | 10854400 | 1900 | |
65659065 | vsulovyev | D | Nov. 24, 2019, 11:38 a.m. | OK | MS C++ 2017 | TESTS | 57 | 343 | 33996800 | 1900 | |
62726476 | MVP | D | Oct. 16, 2019, 4:41 p.m. | OK | PyPy 2 | TESTS | 57 | 202 | 11776000 | 1900 | |
62746455 | injust | D | Oct. 16, 2019, 9:55 p.m. | OK | PyPy 2 | TESTS | 57 | 311 | 13516800 | 1900 | |
62745890 | injust | D | Oct. 16, 2019, 9:36 p.m. | OK | PyPy 2 | TESTS | 57 | 312 | 13516800 | 1900 | |
62736243 | injust | D | Oct. 16, 2019, 6:26 p.m. | OK | PyPy 2 | TESTS | 57 | 327 | 13516800 | 1900 | |
62723074 | alexwice | D | Oct. 16, 2019, 4:25 p.m. | OK | PyPy 2 | TESTS | 57 | 343 | 32972800 | 1900 | |
62722489 | injust | D | Oct. 16, 2019, 4:23 p.m. | OK | PyPy 2 | TESTS | 57 | 358 | 13004800 | 1900 | |
62713461 | pajenegod | D | Oct. 16, 2019, 3:46 p.m. | OK | PyPy 2 | TESTS | 57 | 451 | 17408000 | 1900 | |
62874640 | jklcrek | D | Oct. 18, 2019, 2:54 p.m. | OK | PyPy 3 | TESTS | 57 | 358 | 13414400 | 1900 | |
62852059 | Code_Bear | D | Oct. 18, 2019, 7:46 a.m. | OK | PyPy 3 | TESTS | 57 | 405 | 16179200 | 1900 | |
62711389 | FireBird23 | D | Oct. 16, 2019, 3:38 p.m. | OK | PyPy 3 | TESTS | 57 | 421 | 15360000 | 1900 | |
62747011 | FireBird23 | D | Oct. 16, 2019, 10:15 p.m. | OK | PyPy 3 | TESTS | 57 | 436 | 15257600 | 1900 | |
62724390 | pineriver | D | Oct. 16, 2019, 4:31 p.m. | OK | PyPy 3 | TESTS | 57 | 561 | 31334400 | 1900 | |
62974666 | macleChen | D | Oct. 20, 2019, 8:09 a.m. | OK | PyPy 3 | TESTS | 57 | 889 | 20275200 | 1900 | |
62718727 | Kiri8128 | D | Oct. 16, 2019, 4:07 p.m. | OK | PyPy 3 | TESTS | 57 | 997 | 29696000 | 1900 | |
62722922 | titia | D | Oct. 16, 2019, 4:25 p.m. | OK | PyPy 3 | TESTS | 57 | 1092 | 15462400 | 1900 | |
67325267 | cftt | D | Dec. 21, 2019, 9:32 a.m. | OK | PyPy 3 | TESTS | 57 | 1201 | 27443200 | 1900 | |
62876179 | jklcrek | D | Oct. 18, 2019, 3:23 p.m. | OK | PyPy 3 | TESTS | 57 | 1309 | 13516800 | 1900 | |
65952562 | gu_castle | D | Nov. 29, 2019, 11:28 a.m. | OK | Rust | TESTS | 57 | 62 | 7782400 | 1900 | |
62714627 | sansen | D | Oct. 16, 2019, 3:50 p.m. | OK | Rust | TESTS | 57 | 187 | 11161600 | 1900 | |
67970525 | gearjack | D | Dec. 30, 2019, 2:51 p.m. | OK | Rust | TESTS | 57 | 468 | 13824000 | 1900 |
Back to search problems