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 |
---|---|---|---|---|---|---|
1129 | Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1) | FINISHED | False | 7200 | 186416687 | Feb. 24, 2019, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 934 ) | C | Morse Code | PROGRAMMING | binary search data structures dp hashing sortings string suffix structures strings | 2300 |
B'In Morse code, an letter of English alphabet is represented as a string of some length from 1 to 4 . Moreover, each Morse code representation of an English letter contains only dots and dashes. In this task, we will represent a dot with a "0" and a dash with a "1". Because there are 2^1+2^2+2^3+2^4 = 30 strings with length 1 to 4 containing only "0" and/or "1", not all of them correspond to one of the 26 English letters. In particular, each string of "0" and/or "1" of length at most 4 translates into a distinct English letter, except the following four strings that do not correspond to any English alphabet: "0011", "0101", "1110", and "1111". You will work with a string S , which is initially empty. For m times, either a dot or a dash will be appended to S , one at a time. Your task is to find and report, after each of these modifications to string S , the number of non-empty sequences of English letters that are represented with some substring of S in Morse code. Since the answers can be incredibly tremendous, print them modulo 10^9 + 7 . The first line contains an integer m ( 1 <= q m <= q 3 ,000 ) -- the number of modifications to S . Each of the next m lines contains either a "0" (representing a dot) or a "1" (representing a dash), specifying which character should be appended to S . Print m lines, the i -th of which being the answer after the i -th modification to S . Let us consider the first sample after all characters have been appended to S , so S is "111". As you can see, "1", "11", and "111" all correspond to some distinct English letter. In fact, they are translated into a 'T ', an 'M ', and an 'O ', respectively. All non-empty sequences of English letters that are represented with some substring of S in Morse code, therefore, are as follows. Although unnecessary for this task, a conversion table from English alphab'... |
65520 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
50440556 | hos.lyric | C | Feb. 24, 2019, 3:53 p.m. | OK | D | TESTS | 45 | 1996 | 122060800 | 2300 | |
50456397 | rainboy | C | Feb. 24, 2019, 5:10 p.m. | OK | GNU C11 | TESTS | 45 | 140 | 72192000 | 2300 | |
50470176 | ccosi | C | Feb. 24, 2019, 11:26 p.m. | OK | GNU C++11 | TESTS | 45 | 31 | 204800 | 2300 | |
50489565 | little_waxberry | C | Feb. 25, 2019, 12:52 p.m. | OK | GNU C++11 | TESTS | 45 | 31 | 409600 | 2300 | |
50478935 | nealchen | C | Feb. 25, 2019, 7:51 a.m. | OK | GNU C++11 | TESTS | 45 | 31 | 512000 | 2300 | |
50559541 | KillerX | C | Feb. 27, 2019, 10:09 a.m. | OK | GNU C++11 | TESTS | 45 | 31 | 614400 | 2300 | |
51943575 | krijgertje | C | March 28, 2019, 3:38 p.m. | OK | GNU C++11 | TESTS | 45 | 31 | 614400 | 2300 | |
53045494 | lzoilxy | C | April 20, 2019, 11:57 a.m. | OK | GNU C++11 | TESTS | 45 | 31 | 64000000 | 2300 | |
50998815 | lhylhy | C | March 8, 2019, 5:45 a.m. | OK | GNU C++11 | TESTS | 45 | 31 | 126259200 | 2300 | |
53008179 | lzoizzq | C | April 19, 2019, 10:42 a.m. | OK | GNU C++11 | TESTS | 45 | 31 | 126259200 | 2300 | |
53110345 | lzoilxy | C | April 22, 2019, 1:43 a.m. | OK | GNU C++11 | TESTS | 45 | 46 | 64000000 | 2300 | |
51947892 | krijgertje | C | March 28, 2019, 6 p.m. | OK | GNU C++11 | TESTS | 45 | 77 | 37068800 | 2300 | |
52804619 | walht | C | April 16, 2019, 2:46 a.m. | OK | GNU C++14 | TESTS | 45 | 31 | 204800 | 2300 | |
52804666 | walht | C | April 16, 2019, 2:49 a.m. | OK | GNU C++14 | TESTS | 45 | 31 | 204800 | 2300 | |
56603553 | RobeZH | C | July 6, 2019, 2:46 a.m. | OK | GNU C++14 | TESTS | 45 | 31 | 6451200 | 2300 | |
56603575 | vjudge5 | C | July 6, 2019, 2:47 a.m. | OK | GNU C++14 | TESTS | 45 | 31 | 6451200 | 2300 | |
56772640 | Scut82 | C | July 9, 2019, 11:41 p.m. | OK | GNU C++14 | TESTS | 45 | 77 | 102400 | 2300 | |
50453127 | MofK | C | Feb. 24, 2019, 4:50 p.m. | OK | GNU C++14 | TESTS | 45 | 78 | 72396800 | 2300 | |
50451586 | step_by_step | C | Feb. 24, 2019, 4:41 p.m. | OK | GNU C++14 | TESTS | 45 | 93 | 0 | 2300 | |
50472836 | zsyzsy | C | Feb. 25, 2019, 3:03 a.m. | OK | GNU C++14 | TESTS | 45 | 93 | 36864000 | 2300 | |
50871520 | wclee2265 | C | March 6, 2019, 2:16 a.m. | OK | GNU C++14 | TESTS | 45 | 93 | 72396800 | 2300 | |
54545434 | SUDAL | C | May 24, 2019, 5:52 a.m. | OK | GNU C++14 | TESTS | 45 | 93 | 72704000 | 2300 | |
53121717 | adoubiq | C | April 22, 2019, 11:41 a.m. | OK | GNU C++17 | TESTS | 45 | 46 | 24985600 | 2300 | |
51033661 | livyx | C | March 8, 2019, 2:10 p.m. | OK | GNU C++17 | TESTS | 45 | 62 | 80179200 | 2300 | |
50462783 | alex9801 | C | Feb. 24, 2019, 6:40 p.m. | OK | GNU C++17 | TESTS | 45 | 78 | 45568000 | 2300 | |
50872437 | sdcgvhgj | C | March 6, 2019, 3:16 a.m. | OK | GNU C++17 | TESTS | 45 | 78 | 50073600 | 2300 | |
64479154 | Diorvh | C | Nov. 7, 2019, 3:21 p.m. | OK | GNU C++17 | TESTS | 45 | 93 | 102400 | 2300 | |
50604691 | vjudge3 | C | Feb. 28, 2019, 2:06 p.m. | OK | GNU C++17 | TESTS | 45 | 93 | 36454400 | 2300 | |
50460157 | alex9801 | C | Feb. 24, 2019, 5:31 p.m. | OK | GNU C++17 | TESTS | 45 | 93 | 45568000 | 2300 | |
50483439 | Fedosik | C | Feb. 25, 2019, 10:19 a.m. | OK | GNU C++17 | TESTS | 45 | 93 | 72192000 | 2300 | |
58081913 | Lucina | C | July 31, 2019, 2:10 p.m. | OK | GNU C++17 | TESTS | 45 | 93 | 84582400 | 2300 | |
53115760 | adoubiq | C | April 22, 2019, 7:53 a.m. | OK | GNU C++17 | TESTS | 45 | 108 | 3993600 | 2300 | |
52500216 | cylixstar | C | April 8, 2019, 3:42 p.m. | OK | Haskell | TESTS | 45 | 608 | 2252800 | 2300 | |
52517531 | cylixstar | C | April 9, 2019, 6:38 a.m. | OK | Haskell | TESTS | 45 | 623 | 2252800 | 2300 | |
50449127 | ilyakor | C | Feb. 24, 2019, 4:28 p.m. | OK | Java 8 | TESTS | 45 | 296 | 17305600 | 2300 | |
50467139 | Dukkha | C | Feb. 24, 2019, 8:33 p.m. | OK | Java 8 | TESTS | 45 | 374 | 77107200 | 2300 | |
50874788 | alexrcoleman | C | March 6, 2019, 5:27 a.m. | OK | Java 8 | TESTS | 45 | 421 | 207564800 | 2300 | |
50646024 | Xylenox | C | March 1, 2019, 3:44 p.m. | OK | Java 8 | TESTS | 45 | 436 | 108953600 | 2300 | |
50646220 | Xylenox | C | March 1, 2019, 3:48 p.m. | OK | Java 8 | TESTS | 45 | 451 | 108339200 | 2300 | |
50646192 | Xylenox | C | March 1, 2019, 3:47 p.m. | OK | Java 8 | TESTS | 45 | 452 | 108544000 | 2300 | |
50645808 | Xylenox | C | March 1, 2019, 3:41 p.m. | OK | Java 8 | TESTS | 45 | 452 | 113664000 | 2300 | |
50645994 | Xylenox | C | March 1, 2019, 3:44 p.m. | OK | Java 8 | TESTS | 45 | 467 | 110489600 | 2300 | |
50624882 | I_love_Harpae | C | March 1, 2019, 5:14 a.m. | OK | Java 8 | TESTS | 45 | 467 | 143769600 | 2300 | |
50584269 | Xylenox | C | Feb. 28, 2019, 1:38 a.m. | OK | Java 8 | TESTS | 45 | 530 | 259481600 | 2300 | |
63825878 | vjudge2 | C | Oct. 30, 2019, 1:23 p.m. | OK | Mono C# | TESTS | 45 | 295 | 3174400 | 2300 | |
50448068 | riantkb | C | Feb. 24, 2019, 4:22 p.m. | OK | Mono C# | TESTS | 45 | 1590 | 223027200 | 2300 | |
52531538 | vjudge4 | C | April 9, 2019, 1:39 p.m. | OK | MS C++ | TESTS | 45 | 171 | 36352000 | 2300 | |
52529284 | vjudge1 | C | April 9, 2019, 12:51 p.m. | OK | MS C++ | TESTS | 45 | 186 | 145305600 | 2300 | |
52601181 | vjudge1 | C | April 11, 2019, 11:58 a.m. | OK | MS C++ | TESTS | 45 | 608 | 179404800 | 2300 | |
52601423 | vjudge1 | C | April 11, 2019, 12:04 p.m. | OK | MS C++ | TESTS | 45 | 639 | 179404800 | 2300 | |
50450981 | xtalclr | C | Feb. 24, 2019, 4:38 p.m. | OK | MS C++ 2017 | TESTS | 45 | 264 | 41676800 | 2300 | |
50731819 | 324857679 | C | March 3, 2019, 11:23 a.m. | OK | MS C++ 2017 | TESTS | 45 | 280 | 144793600 | 2300 | |
50465689 | vpike | C | Feb. 24, 2019, 7:42 p.m. | OK | MS C++ 2017 | TESTS | 45 | 311 | 72499200 | 2300 | |
50730275 | 324857679 | C | March 3, 2019, 11:03 a.m. | OK | MS C++ 2017 | TESTS | 45 | 467 | 179404800 | 2300 | |
51434190 | hld67890 | C | March 18, 2019, 4:53 a.m. | OK | MS C++ 2017 | TESTS | 45 | 1138 | 240844800 | 2300 | |
53191571 | pajenegod | C | April 23, 2019, 1:07 p.m. | OK | PyPy 3 | TESTS | 45 | 624 | 8089600 | 2300 | |
53191331 | pajenegod | C | April 23, 2019, 1 p.m. | OK | PyPy 3 | TESTS | 45 | 935 | 9625600 | 2300 | |
53191009 | pajenegod | C | April 23, 2019, 12:52 p.m. | OK | PyPy 3 | TESTS | 45 | 966 | 10444800 | 2300 | |
53190640 | pajenegod | C | April 23, 2019, 12:42 p.m. | OK | PyPy 3 | TESTS | 45 | 967 | 10649600 | 2300 | |
53191198 | pajenegod | C | April 23, 2019, 12:57 p.m. | OK | PyPy 3 | TESTS | 45 | 1138 | 9728000 | 2300 | |
53190639 | meooow | C | April 23, 2019, 12:42 p.m. | OK | PyPy 3 | TESTS | 45 | 1450 | 10854400 | 2300 | |
53190254 | meooow | C | April 23, 2019, 12:31 p.m. | OK | PyPy 3 | TESTS | 45 | 1481 | 10752000 | 2300 | |
53190684 | meooow | C | April 23, 2019, 12:43 p.m. | OK | PyPy 3 | TESTS | 45 | 1560 | 10752000 | 2300 |
Back to search problems