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 |
---|---|---|---|---|---|---|
1032 | Technocup 2019 - Elimination Round 3 | FINISHED | False | 8400 | 189266099 | Nov. 18, 2018, 4:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3984 ) | C | Playing Piano | PROGRAMMING | constructive algorithms dp | 1800 |
B'Little Paul wants to learn how to play piano. He already has a melody he wants to start with. For simplicity he represented this melody as a sequence a_1, a_2, ldots, a_n of key numbers: the more a number is, the closer it is to the right end of the piano keyboard. Paul is very clever and knows that the essential thing is to properly assign fingers to notes he 's going to play. If he chooses an inconvenient fingering, he will then waste a lot of time trying to learn how to play the melody by these fingers and he will probably not succeed. Let 's denote the fingers of hand by numbers from 1 to 5 . We call a fingering any sequence b_1, ldots, b_n of fingers numbers. A fingering is convenient if for all 1 <= q i <= q n - 1 the following holds: Please provide any convenient fingering or find out that there is none. The first line contains a single integer n ( 1 <= n <= 10^5 ) denoting the number of notes. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 2 cdot10^5 ) denoting the positions of notes on the keyboard. If there is no convenient fingering, print -1 . Otherwise, print n numbers b_1, b_2, ldots, b_n , each from 1 to 5 , denoting a convenient fingering, separated by spaces. The third sample test is kinda "Non stop" song by Reflex. '... |
Codeforces Round #522 and Technocup 2019 Elimination Round 3 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
47592315 | prudhvir3ddy | C | Dec. 27, 2018, 4:58 p.m. | OK | Clang++17 Diagnostics | TESTS | 39 | 155 | 52121600 | 1800 | |
53099784 | rr_ | C | April 21, 2019, 3:42 p.m. | OK | D | TESTS | 39 | 62 | 22425600 | 1800 | |
46409930 | Oompaloompa | C | Nov. 30, 2018, 4:33 p.m. | OK | FPC | TESTS | 39 | 327 | 2764800 | 1800 | |
46410020 | Oompaloompa | C | Nov. 30, 2018, 4:37 p.m. | OK | FPC | TESTS | 39 | 327 | 2867200 | 1800 | |
46183647 | cortan122 | C | Nov. 24, 2018, 7:39 p.m. | OK | GNU C11 | TESTS | 39 | 327 | 3686400 | 1800 | |
47285570 | manh9203 | C | Dec. 20, 2018, 5:55 a.m. | OK | GNU C11 | TESTS | 39 | 342 | 6451200 | 1800 | |
49341662 | pedrocb | C | Feb. 2, 2019, 12:09 a.m. | OK | GNU C11 | TESTS | 39 | 343 | 10956800 | 1800 | |
46740832 | Althen | C | Dec. 8, 2018, 2:15 a.m. | OK | GNU C++11 | TESTS | 39 | 31 | 20480000 | 1800 | |
45983161 | BLUESKY007 | C | Nov. 20, 2018, 3:26 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 1228800 | 1800 | |
45952220 | AAATK | C | Nov. 19, 2018, 7:06 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 1228800 | 1800 | |
48548312 | eason2012 | C | Jan. 18, 2019, 9:49 p.m. | OK | GNU C++11 | TESTS | 39 | 46 | 1638400 | 1800 | |
46023637 | gaelim | C | Nov. 21, 2018, 9:43 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 2048000 | 1800 | |
45941845 | Slonik | C | Nov. 18, 2018, 8:04 p.m. | OK | GNU C++11 | TESTS | 38 | 46 | 2662400 | 1800 | |
55608827 | ticmis | C | June 16, 2019, 3:49 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 3174400 | 1800 | |
55609418 | ticmis | C | June 16, 2019, 4:24 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 3174400 | 1800 | |
55615373 | luogu_bot1 | C | June 16, 2019, 8:34 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 3174400 | 1800 | |
55109591 | vjudge4 | C | June 5, 2019, 5:28 a.m. | OK | GNU C++11 | TESTS | 39 | 46 | 3276800 | 1800 | |
45930554 | Lana01 | C | Nov. 18, 2018, 5:02 p.m. | OK | GNU C++14 | TESTS | 38 | 46 | 819200 | 1800 | |
67048018 | madlogic | C | Dec. 17, 2019, 1:09 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 819200 | 1800 | |
52609139 | Limeni | C | April 11, 2019, 3:14 p.m. | OK | GNU C++14 | TESTS | 39 | 46 | 819200 | 1800 | |
50344570 | vjudge4 | C | Feb. 23, 2019, 5:33 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 819200 | 1800 | |
46963203 | Green_zh | C | Dec. 13, 2018, 9:36 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 819200 | 1800 | |
45949702 | sodafago | C | Nov. 19, 2018, 4:51 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 819200 | 1800 | |
50344528 | vjudge3 | C | Feb. 23, 2019, 5:31 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 1228800 | 1800 | |
56466066 | smasHR | C | July 3, 2019, 8:58 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 1536000 | 1800 | |
45959711 | melissimo | C | Nov. 19, 2018, 11:05 a.m. | OK | GNU C++14 | TESTS | 39 | 46 | 2457600 | 1800 | |
45941824 | YanikusGG | C | Nov. 18, 2018, 8:04 p.m. | OK | GNU C++14 | TESTS | 38 | 46 | 2457600 | 1800 | |
51856888 | titovtima | C | March 26, 2019, 11:33 a.m. | OK | GNU C++17 | TESTS | 39 | 46 | 819200 | 1800 | |
46963251 | 201612201401011 | C | Dec. 13, 2018, 9:38 a.m. | OK | GNU C++17 | TESTS | 39 | 46 | 819200 | 1800 | |
56382053 | _PortgasD.Ace_ | C | July 1, 2019, 8:53 a.m. | OK | GNU C++17 | TESTS | 39 | 46 | 819200 | 1800 | |
47270521 | hinkopihpih | C | Dec. 19, 2018, 4:25 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1024000 | 1800 | |
45929382 | 00YoYYYYoYYoYYYYoY00 | C | Nov. 18, 2018, 4:55 p.m. | OK | GNU C++17 | TESTS | 38 | 46 | 1024000 | 1800 | |
46906791 | janezb | C | Dec. 11, 2018, 2:39 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1228800 | 1800 | |
45944292 | practc | C | Nov. 18, 2018, 9:44 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1433600 | 1800 | |
49331576 | RDmitriyS | C | Feb. 1, 2019, 4:29 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1433600 | 1800 | |
46650031 | Nakagawa.Kanon | C | Dec. 5, 2018, 1:34 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1638400 | 1800 | |
48494015 | happy25 | C | Jan. 17, 2019, 12:12 p.m. | OK | GNU C++17 | TESTS | 39 | 46 | 1740800 | 1800 | |
68150847 | saurabhs1206 | C | Jan. 4, 2020, 6:50 a.m. | OK | Java 8 | TESTS | 39 | 124 | 0 | 1800 | |
46010185 | 4mda4mda | C | Nov. 20, 2018, 7:41 p.m. | OK | Java 8 | TESTS | 39 | 139 | 0 | 1800 | |
68493177 | chojh1222 | C | Jan. 10, 2020, 12:27 p.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
60737844 | Shady51 | C | Sept. 17, 2019, 6:22 p.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
57373976 | 4mda4mda | C | July 20, 2019, 11:51 a.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
46115205 | tsumit023 | C | Nov. 23, 2018, 1:38 p.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
46043449 | 4mda4mda | C | Nov. 21, 2018, 10:12 p.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
46010253 | 4mda4mda | C | Nov. 20, 2018, 7:45 p.m. | OK | Java 8 | TESTS | 39 | 140 | 0 | 1800 | |
45980394 | SpargelTarzan | C | Nov. 19, 2018, 10:28 p.m. | OK | Java 8 | TESTS | 39 | 155 | 0 | 1800 | |
46011888 | beroul | C | Nov. 20, 2018, 9:10 p.m. | OK | Java 8 | TESTS | 39 | 170 | 4505600 | 1800 | |
51756994 | hongquanntct | C | March 23, 2019, noon | OK | Mono C# | TESTS | 39 | 374 | 15462400 | 1800 | |
45972406 | Coder_D | C | Nov. 19, 2018, 4:35 p.m. | OK | Mono C# | TESTS | 39 | 389 | 21606400 | 1800 | |
47098736 | sinapusu2002 | C | Dec. 16, 2018, 9:40 a.m. | OK | MS C++ | TESTS | 39 | 124 | 3788800 | 1800 | |
47038258 | Ksenia_C | C | Dec. 15, 2018, 1:25 p.m. | OK | MS C++ | TESTS | 39 | 124 | 5632000 | 1800 | |
45930813 | Ser__007 | C | Nov. 18, 2018, 5:03 p.m. | OK | MS C++ | TESTS | 38 | 124 | 7065600 | 1800 | |
55115986 | st1vdy | C | June 5, 2019, 8:40 a.m. | OK | MS C++ 2017 | TESTS | 39 | 124 | 11776000 | 1800 | |
65217895 | DarisHS | C | Nov. 16, 2019, 7:20 p.m. | OK | MS C++ 2017 | TESTS | 39 | 156 | 6451200 | 1800 | |
45937287 | ElIlia | C | Nov. 18, 2018, 5:52 p.m. | OK | PascalABC.NET | TESTS | 38 | 670 | 0 | 1800 | |
47039852 | NYARENARD | C | Dec. 15, 2018, 2:09 p.m. | OK | PascalABC.NET | TESTS | 39 | 670 | 0 | 1800 | |
46705177 | YESMAths | C | Dec. 7, 2018, 6:35 a.m. | OK | PyPy 2 | TESTS | 39 | 248 | 14336000 | 1800 | |
48051610 | foyght4635253456346 | C | Jan. 7, 2019, 9:30 a.m. | OK | PyPy 2 | TESTS | 39 | 249 | 19558400 | 1800 | |
46308998 | Mulx10 | C | Nov. 28, 2018, 12:06 p.m. | OK | PyPy 2 | TESTS | 39 | 264 | 20992000 | 1800 | |
46022792 | crzskt | C | Nov. 21, 2018, 9:11 a.m. | OK | PyPy 2 | TESTS | 39 | 280 | 19763200 | 1800 | |
55949963 | homoeconomicus | C | June 23, 2019, 12:30 a.m. | OK | PyPy 3 | TESTS | 39 | 326 | 19763200 | 1800 | |
60501413 | ulyss | C | Sept. 13, 2019, 6:54 p.m. | OK | PyPy 3 | TESTS | 39 | 342 | 14028800 | 1800 | |
45942374 | alexey_kuldoshin | C | Nov. 18, 2018, 8:19 p.m. | OK | PyPy 3 | TESTS | 39 | 343 | 18022400 | 1800 | |
45931936 | TheProgrammer256 | C | Nov. 18, 2018, 5:09 p.m. | OK | PyPy 3 | TESTS | 38 | 420 | 25190400 | 1800 | |
50049445 | pootis | C | Feb. 17, 2019, 7:28 a.m. | OK | Python 2 | TESTS | 39 | 327 | 6041600 | 1800 | |
46032185 | noob77777 | C | Nov. 21, 2018, 2:20 p.m. | OK | Python 2 | TESTS | 39 | 857 | 12697600 | 1800 | |
46014520 | pedrofreire | C | Nov. 21, 2018, 12:55 a.m. | OK | Python 3 | TESTS | 39 | 311 | 7065600 | 1800 | |
45938991 | asvasil | C | Nov. 18, 2018, 6:06 p.m. | OK | Python 3 | TESTS | 38 | 327 | 6041600 | 1800 | |
45935761 | bushm174 | C | Nov. 18, 2018, 5:35 p.m. | OK | Python 3 | TESTS | 38 | 374 | 7372800 | 1800 | |
45977206 | _Mapleshade_ | C | Nov. 19, 2018, 7:26 p.m. | OK | Python 3 | TESTS | 39 | 389 | 7475200 | 1800 | |
45951127 | DanilM | C | Nov. 19, 2018, 6:10 a.m. | OK | Python 3 | TESTS | 39 | 405 | 7475200 | 1800 | |
45935511 | Helloo_zk | C | Nov. 18, 2018, 5:33 p.m. | OK | Python 3 | TESTS | 38 | 421 | 7372800 | 1800 | |
45937769 | petrtsv | C | Nov. 18, 2018, 5:53 p.m. | OK | Python 3 | TESTS | 38 | 421 | 7475200 | 1800 | |
45970212 | kolya250403 | C | Nov. 19, 2018, 3:31 p.m. | OK | Python 3 | TESTS | 39 | 436 | 7065600 | 1800 | |
45946346 | ddd127 | C | Nov. 19, 2018, 12:47 a.m. | OK | Python 3 | TESTS | 39 | 436 | 7065600 | 1800 | |
51555318 | chauhain | C | March 20, 2019, 4:26 a.m. | OK | Python 3 | TESTS | 39 | 592 | 11571200 | 1800 | |
46003522 | johnchen902 | C | Nov. 20, 2018, 3:44 p.m. | OK | Rust | TESTS | 39 | 31 | 6144000 | 1800 | |
46003688 | johnchen902 | C | Nov. 20, 2018, 3:49 p.m. | OK | Rust | TESTS | 39 | 46 | 3276800 | 1800 |
Back to search problems