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 |
|---|---|---|---|---|---|---|
| 2004 | Educational Codeforces Round 169 (Rated for Div. 2) | FINISHED | False | 7200 | 52673123 | Aug. 15, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 420 ) | G | Substring Compression | PROGRAMMING | data structures matrices |
Let's define the operation of compressing a string (t), consisting of at least (2) digits from (1) to (9), as follows: split it into an even number of non-empty substrings — let these substrings be (t_1, t_2, \dots, t_m) (so, (t = t_1 + t_2 + \dots + t_m), where (+) is the concatenation operation); write the string (t_2) (t_1) times, then the string (t_4) (t_3) times, and so on. For example, for a string " 12345 ", one could do the following: split it into (" 1 ", " 23 ", " 4 ", " 5 "), and write " 235555 ". Let the function (f(t)) for a string (t) return the minimum length of the string that can be obtained as a result of that process. You are given a string (s), consisting of (n) digits from (1) to (9), and an integer (k). Calculate the value of the function (f) for all contiguous substrings of (s) of length exactly (k). The first line contains two integers (n) and (k) ((2 \le k \le n \le 2 \cdot 10^5)). The second line contains the string (s) ((|s| = n)), consisting only of digits from (1) to (9). Output (n - k + 1) integers — (f(s_{1,k}), f(s_{2,k+1}), \dots, f(s_{n - k + 1, n})). |
| Educational Codeforces Round 169 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 276741083 | lfxxxx | G | Aug. 16, 2024, 7:23 a.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 624 | 168550400 | ||
| 276798113 | Md._Nahid_Ullah_Joy | G | Aug. 16, 2024, 2:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 889 | 235212800 | ||
| 276799004 | Yuuuuuuuuuuuuuuuuu | G | Aug. 16, 2024, 3:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 1859 | 441241600 | ||
| 276815301 | neal | G | Aug. 16, 2024, 4:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 93 | 13721600 | ||
| 276813223 | neal | G | Aug. 16, 2024, 4:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 93 | 13721600 | ||
| 276730941 | neal | G | Aug. 16, 2024, 4:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 124 | 13721600 | ||
| 276853781 | Little_Sheep_Yawn | G | Aug. 17, 2024, 1:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 187 | 77824000 | ||
| 276730196 | neal | G | Aug. 16, 2024, 4:41 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 187 | 158003200 | ||
| 276859889 | Yam | G | Aug. 17, 2024, 3:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 202 | 85811200 | ||
| 276730938 | neal | G | Aug. 16, 2024, 4:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 203 | 158003200 | ||
| 276744916 | concuuduoc | G | Aug. 16, 2024, 7:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 280 | 264089600 | ||
| 276753400 | BaoJiaoPisu | G | Aug. 16, 2024, 9 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 312 | 194867200 | ||
| 276866235 | qkm66666 | G | Aug. 17, 2024, 4:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 343 | 161894400 | ||
| 276755737 | nguyenquocthao00 | G | Aug. 16, 2024, 9:16 a.m. | OK | Go | TESTS | 39 | 1968 | 714444800 | ||
| 276750044 | nguyenquocthao00 | G | Aug. 16, 2024, 8:38 a.m. | OK | Go | TESTS | 39 | 1984 | 655667200 | ||
| 276853333 | dzhi | G | Aug. 17, 2024, 1:06 a.m. | OK | Java 21 | TESTS | 39 | 1780 | 254771200 | ||
| 276847289 | gamegame | G | Aug. 16, 2024, 10:33 p.m. | OK | PyPy 3-64 | TESTS | 39 | 890 | 97382400 | ||
| 276869318 | Farhan.WaheedSS | G | Aug. 17, 2024, 5:21 a.m. | OK | PyPy 3-64 | TESTS | 39 | 936 | 97382400 | ||
| 276846765 | gamegame | G | Aug. 16, 2024, 10:21 p.m. | OK | PyPy 3-64 | TESTS | 39 | 999 | 68608000 |
Back to search problems