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 |
|---|---|---|---|---|---|---|
| 2061 | IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) | FINISHED | False | 10800 | 39021923 | Jan. 20, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2259 ) | F1 | Kevin and Binary String (Easy Version) | PROGRAMMING | binary search brute force data structures dp greedy implementation strings two pointers |
This is the easy version of the problem. The difference between the versions is that in this version, string (t) consists of only '0' and '1'. You can hack only if you solved all versions of this problem. Kevin has a binary string (s) of length (n). Kevin can perform the following operation: Choose two adjacent blocks of (s) and swap them. A block is a maximal substring(^{\text{∗}}) of identical characters. Formally, denote (sl,r) as the substring (s_l s_{l+1} \ldots s_r). A block is (sl,r) satisfying: (l=1) or (s_l\not=s_{l-1}). (s_l=s_{l+1} = \ldots = s_{r}). (r=n) or (s_r\not=s_{r+1}). Adjacent blocks are two blocks (sl_1,r_1) and (sl_2,r_2) satisfying (r_1+1=l_2). For example, if (s=\mathtt{000}\,\mathbf{11}\,\mathbf{00}\,\mathtt{111}), Kevin can choose the two blocks (s4,5) and (s6,7) and swap them, transforming (s) into (\mathtt{000}\,\mathbf{00}\,\mathbf{11}\,\mathtt{111}). Given a string (t) of length (n) consisting of '0', '1' and '?', Kevin wants to determine the minimum number of operations required to perform such that for any index (i) ((1\le i\le n)), if (t_i\not=) '?' then (s_i=t_i). If it is impossible, output (-1). (^{\text{∗}})A string (a) is a substring of a string (b) if (a) can be obtained from (b) by the deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains a string (s) consisting of '0' and '1'. The second line of each test case contains a string (t) consisting of '0' and '1' . It is guaranteed that the lengths of (s) and (t) are the same. It is guaranteed that the sum of the length of (s) |
| IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 302158759 | mzmz001 | F1 | Jan. 21, 2025, 1:20 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 102400 | ||
| 302166444 | fangzx | F1 | Jan. 21, 2025, 3:15 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 819200 | ||
| 302133992 | sas4eka | F1 | Jan. 20, 2025, 6:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 921600 | ||
| 302169897 | lfxxx | F1 | Jan. 21, 2025, 3:58 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 2457600 | ||
| 302168795 | Ritos__ | F1 | Jan. 21, 2025, 3:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 4198400 | ||
| 302178357 | daniel604 | F1 | Jan. 21, 2025, 5:40 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 4300800 | ||
| 302123400 | dan_dolmatov | F1 | Jan. 20, 2025, 5:18 p.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 4403200 | ||
| 302161253 | qybqyb | F1 | Jan. 21, 2025, 2:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 7270400 | ||
| 302128583 | masonpop | F1 | Jan. 20, 2025, 5:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 7270400 | ||
| 302159932 | MarioYC | F1 | Jan. 21, 2025, 1:41 a.m. | OK | C++17 (GCC 7-32) | TESTS | 33 | 62 | 7987200 | ||
| 302166445 | top_tree | F1 | Jan. 21, 2025, 3:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 61 | 9420800 | ||
| 302127070 | picramide | F1 | Jan. 20, 2025, 5:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 102400 | ||
| 302128080 | ashishc1 | F1 | Jan. 20, 2025, 5:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 1228800 | ||
| 302164460 | Abdullah-Ishfaq | F1 | Jan. 21, 2025, 2:49 a.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 1433600 | ||
| 302117178 | avnithv | F1 | Jan. 20, 2025, 4:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 2355200 | ||
| 302164449 | Syrus | F1 | Jan. 21, 2025, 2:49 a.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 4198400 | ||
| 302138875 | coldminded | F1 | Jan. 20, 2025, 7:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 4198400 | ||
| 302127147 | Alir3za.Zar3 | F1 | Jan. 20, 2025, 5:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 4198400 | ||
| 302123777 | invertedwinger | F1 | Jan. 20, 2025, 5:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 4198400 | ||
| 302117785 | DanTheMan. | F1 | Jan. 20, 2025, 5:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 33 | 62 | 4198400 | ||
| 302117259 | bieybay | F1 | Jan. 20, 2025, 5 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 61 | 0 | ||
| 302164149 | Joler_ | F1 | Jan. 21, 2025, 2:45 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 0 | ||
| 302122157 | ditmengotband | F1 | Jan. 20, 2025, 5:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 102400 | ||
| 302120667 | yatharthsinghal1 | F1 | Jan. 20, 2025, 5:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 102400 | ||
| 302155233 | nyavim | F1 | Jan. 21, 2025, 12:08 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 2150400 | ||
| 302125678 | Ari | F1 | Jan. 20, 2025, 5:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 3788800 | ||
| 302164603 | WTXwang | F1 | Jan. 21, 2025, 2:51 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 4505600 | ||
| 302124800 | ElliotNightlight | F1 | Jan. 20, 2025, 5:22 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 4505600 | ||
| 302116792 | Ibrahimfostok | F1 | Jan. 20, 2025, 4:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 4710400 | ||
| 302179008 | pb0207 | F1 | Jan. 21, 2025, 5:47 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 33 | 62 | 9523200 | ||
| 302119927 | Gassa | F1 | Jan. 20, 2025, 5:07 p.m. | OK | D | TESTS | 33 | 156 | 21196800 | ||
| 302152300 | rainboy | F1 | Jan. 20, 2025, 10:41 p.m. | OK | GNU C11 | TESTS | 33 | 202 | 21913600 | ||
| 302134658 | Quasicoherent | F1 | Jan. 20, 2025, 6:41 p.m. | OK | Java 21 | TESTS | 33 | 343 | 614400 | ||
| 302161683 | man-ray | F1 | Jan. 21, 2025, 2:07 a.m. | OK | Java 21 | TESTS | 33 | 406 | 21913600 | ||
| 302118784 | vzljkf575 | F1 | Jan. 20, 2025, 5:04 p.m. | OK | Java 21 | TESTS | 33 | 577 | 9216000 | ||
| 302173398 | Mustela_Erminea | F1 | Jan. 21, 2025, 4:44 a.m. | OK | Java 21 | TESTS | 33 | 1186 | 79462400 | ||
| 302116811 | etian6795 | F1 | Jan. 20, 2025, 4:59 p.m. | OK | Java 8 | TESTS | 33 | 296 | 19456000 | ||
| 302118731 | vilhelmthorsson | F1 | Jan. 20, 2025, 5:04 p.m. | OK | PyPy 3-64 | TESTS | 33 | 202 | 12800000 | ||
| 302128806 | ibraheemkureshi | F1 | Jan. 20, 2025, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 33 | 202 | 16384000 | ||
| 302169996 | gardengnome | F1 | Jan. 21, 2025, 3:59 a.m. | OK | PyPy 3-64 | TESTS | 33 | 233 | 33996800 | ||
| 302170648 | gardengnome | F1 | Jan. 21, 2025, 4:08 a.m. | OK | PyPy 3-64 | TESTS | 33 | 249 | 17612800 | ||
| 302134479 | AyuAnchor | F1 | Jan. 20, 2025, 6:39 p.m. | OK | PyPy 3-64 | TESTS | 33 | 249 | 19968000 | ||
| 302134272 | sygi | F1 | Jan. 20, 2025, 6:38 p.m. | OK | PyPy 3-64 | TESTS | 33 | 281 | 22835200 | ||
| 302157123 | __baozii__ | F1 | Jan. 21, 2025, 12:47 a.m. | OK | PyPy 3-64 | TESTS | 33 | 531 | 105574400 | ||
| 302118630 | shubhargava | F1 | Jan. 20, 2025, 5:03 p.m. | OK | PyPy 3-64 | TESTS | 33 | 718 | 148684800 | ||
| 302158060 | smilences | F1 | Jan. 21, 2025, 1:07 a.m. | OK | PyPy 3-64 | TESTS | 33 | 780 | 163737600 | ||
| 302123100 | twosquares | F1 | Jan. 20, 2025, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 33 | 796 | 138137600 | ||
| 302123377 | Jimanbanashi | F1 | Jan. 20, 2025, 5:18 p.m. | OK | Python 2 | TESTS | 33 | 780 | 512000 | ||
| 302153683 | 123gjweq2 | F1 | Jan. 20, 2025, 11:18 p.m. | OK | Rust 2021 | TESTS | 33 | 93 | 8908800 |
Back to search problems