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 |
---|---|---|---|---|---|---|
1995 | Codeforces Round 961 (Div. 2) | FINISHED | False | 7200 | 15521063 | July 23, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2461 ) | D | Cases | PROGRAMMING | bitmasks brute force combinatorics dfs and similar dp graphs greedy strings |
B"You're a linguist studying a mysterious ancient language. You know that You have a single text written in this language. Unfortunately, as the language is really ancient, spaces between words are missing and all letters are uppercase. You wonder what is the minimum number of cases the language can have. Can you find this out? Each test consists of several test cases. The first line contains a single integer t ( 1 <= t <= 10 ,000 ) -- the number of test cases. It is followed by descriptions of the test cases. The first line of each test case contains three integers n , c , k ( 1 <= k <= n <= 2^{18} , 1 <= c <= 18 ) -- the length of the text, the number of letters in the language, and the maximum length of the word. The second line contains a string of n characters -- the text itself. Each character is one of the first c uppercase letters of the Latin alphabet. It is guaranteed that the sum of n over all test cases does not exceed 2^{18} and the sum of 2^c over all test cases does not exceed 2^{18} . For each test case, output a single line consisting of a single integer -- the minimum number of cases in the language. In the first test case, there must be five cases in the language (for each of the letters 'A', 'B', 'C', 'D', and 'E' there must be a case that has a corresponding ending). In the fourth test case, one case with ending 'B' is sufficient. "... |
Video Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
272175977 | omeganot | D | July 23, 2024, 5:21 p.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 77 | 0 | ||
272173432 | Darko1 | D | July 23, 2024, 5:10 p.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 77 | 512000 | ||
272228700 | mekoszc | D | July 24, 2024, 12:58 a.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 77 | 1331200 | ||
272221897 | antguz | D | July 23, 2024, 10:30 p.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 77 | 1331200 | ||
272226066 | TLE_Automaton | D | July 24, 2024, 12:14 a.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 78 | 13004800 | ||
272245126 | chennie | D | July 24, 2024, 3:57 a.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 93 | 0 | ||
272246150 | ccqyx123 | D | July 24, 2024, 4:08 a.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 93 | 307200 | ||
272204782 | llzer | D | July 23, 2024, 6:39 p.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 93 | 512000 | ||
272173697 | Ali_Tavakoli | D | July 23, 2024, 5:11 p.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 93 | 1024000 | ||
272243019 | zhangmingzu | D | July 24, 2024, 3:34 a.m. | OK | C++14 (GCC 6-32) | TESTS | 76 | 93 | 1536000 | ||
272252537 | yu-yang | D | July 24, 2024, 5:17 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 0 | ||
272246869 | MintCat | D | July 24, 2024, 4:16 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 0 | ||
272243471 | ghc7hHx | D | July 24, 2024, 3:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 512000 | ||
272230782 | Eznibuil | D | July 24, 2024, 1:27 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 614400 | ||
272249382 | xu826281112 | D | July 24, 2024, 4:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 5529600 | ||
272246444 | MYFJCHX | D | July 24, 2024, 4:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 62 | 9011200 | ||
272255341 | turgon314 | D | July 24, 2024, 5:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 77 | 0 | ||
272250962 | k1nsom | D | July 24, 2024, 5:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 77 | 0 | ||
272211685 | a_dev | D | July 23, 2024, 7:49 p.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 77 | 0 | ||
272208595 | 73501 | D | July 23, 2024, 7:16 p.m. | OK | C++17 (GCC 7-32) | TESTS | 76 | 77 | 0 | ||
272241121 | Susies_Rainyx_Elysia | D | July 24, 2024, 3:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 61 | 0 | ||
272256338 | BLWxSwapNil | D | July 24, 2024, 5:55 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272252388 | Aicu | D | July 24, 2024, 5:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272244922 | FakeDuck | D | July 24, 2024, 3:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272235856 | Fiatiustitia | D | July 24, 2024, 2:25 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272226664 | Axial-Tilted | D | July 24, 2024, 12:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272224648 | Svemit | D | July 23, 2024, 11:41 p.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272174886 | tyristik | D | July 23, 2024, 5:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 0 | ||
272251878 | some_like_it_hot | D | July 24, 2024, 5:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 102400 | ||
272242128 | Susies_Rainyx_Elysia | D | July 24, 2024, 3:25 a.m. | OK | C++20 (GCC 13-64) | TESTS | 76 | 62 | 102400 | ||
272225257 | RockingMat | D | July 23, 2024, 11:57 p.m. | OK | Java 21 | TESTS | 76 | 312 | 1024000 | ||
272245046 | dzhi | D | July 24, 2024, 3:56 a.m. | OK | Java 21 | TESTS | 76 | 390 | 18739200 | ||
272229991 | sahasrad | D | July 24, 2024, 1:16 a.m. | OK | Java 21 | TESTS | 76 | 421 | 37273600 | ||
272208270 | aayush.mishra | D | July 23, 2024, 7:12 p.m. | OK | Kotlin 1.9 | TESTS | 76 | 218 | 204800 | ||
272208144 | aayush.mishra | D | July 23, 2024, 7:11 p.m. | OK | Kotlin 1.9 | TESTS | 76 | 234 | 102400 | ||
272215458 | samoylovboris | D | July 23, 2024, 8:36 p.m. | OK | PyPy 3-64 | TESTS | 76 | 187 | 7372800 | ||
272176983 | mikeac | D | July 23, 2024, 5:27 p.m. | OK | PyPy 3-64 | TESTS | 76 | 202 | 6041600 | ||
272254343 | dirac_de | D | July 24, 2024, 5:35 a.m. | OK | PyPy 3-64 | TESTS | 76 | 203 | 10956800 | ||
272200668 | goncharovmike | D | July 23, 2024, 6:07 p.m. | OK | PyPy 3-64 | TESTS | 76 | 218 | 7168000 | ||
272225494 | Little_Sheep_Yawn | D | July 24, 2024, 12:03 a.m. | OK | PyPy 3-64 | TESTS | 76 | 233 | 9318400 | ||
272204320 | Alex239 | D | July 23, 2024, 6:35 p.m. | OK | PyPy 3-64 | TESTS | 76 | 234 | 11571200 | ||
272246742 | gardengnome | D | July 24, 2024, 4:14 a.m. | OK | PyPy 3-64 | TESTS | 76 | 265 | 45158400 | ||
272246284 | gardengnome | D | July 24, 2024, 4:09 a.m. | OK | PyPy 3-64 | TESTS | 76 | 311 | 46694400 | ||
272245332 | brusgry | D | July 24, 2024, 3:59 a.m. | OK | PyPy 3-64 | TESTS | 76 | 530 | 67993600 | ||
272249450 | Heartbeateffect | D | July 24, 2024, 4:45 a.m. | OK | PyPy 3-64 | TESTS | 76 | 703 | 27340800 | ||
272245828 | Minh20112009 dona10khoa_nhd | D | July 24, 2024, 4:04 a.m. | OK | Python 3 | TESTS | 76 | 1109 | 6041600 | ||
272233425 | liut | D | July 24, 2024, 1:59 a.m. | OK | Rust 2021 | TESTS | 76 | 62 | 0 | ||
272222721 | n685 | D | July 23, 2024, 10:50 p.m. | OK | Rust 2021 | TESTS | 76 | 77 | 819200 | ||
272174974 | toor | D | July 23, 2024, 5:16 p.m. | OK | Rust 2021 | TESTS | 76 | 93 | 0 |
Back to search problems