Codeforces Round 1079 (Div. 1)

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
2196 Codeforces Round 1079 (Div. 1) FINISHED False 10800 5585123 Feb. 11, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 274 ) E1 Fuzzy Concatenation (Easy Version) PROGRAMMING binary search bitmasks brute force data structures greedy string suffix structures

This is the easy version of the problem. The difference between the versions is that in this version, (n \le 10^{5}, m \le 10^{4}). You can hack only if you solved all versions of this problem. There are two strings (s) and (t), both consisting of lowercase Latin letters. You also have an empty string (p). You can perform the following operation, which consists of several stages: choose any two integers (l) and (r) ((1 \le l \le r \le |s|)); copy the substring (s_{l},\ldots, s_{r}) and append it to the end of string (p); among the last (r - l + 1) characters of string (p), change at most one character to any lowercase Latin letter. For example, if the string (s =) " dhhtyhwbsl " and (p =) "", you can choose (l = 3, r = 6) and add " htyh " to the end of (p), and then change the character " y " to " a ", resulting in (p =) " htah ". Your task is to determine the minimum number of operations required for string (p) to become equal to (t). 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 two integers (n) and (m) ((1 \le n \le 10^{5}), (1 \le m \le 10^{4})) — the lengths of strings (s) and (t). The second line of each test case contains the string (s) of length (n), consisting of lowercase Latin letters. The third line of each test case contains the string (t) of length (m), consisting of lowercase Latin letters. It is guaranteed that the sum of (n) across all test cases does not exceed (10^{5}), and the sum of (m) across all test cases does not exceed (10^{4}). For each test case, output a single integer — the answer to the problem. In the first test case, you can take the substring («\mathtt{a}») from the string (s), change a single letter in this string to $$$«\math

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
362524429 Potassium E1 Feb. 11, 2026, 5:27 p.m. OK C++17 (GCC 7-32) TESTS 59 78 41369600
362565850 potato167 E1 Feb. 12, 2026, 3:07 a.m. OK C++17 (GCC 7-32) TESTS 60 125 102400
362565998 potato167 E1 Feb. 12, 2026, 3:10 a.m. OK C++17 (GCC 7-32) TESTS 60 187 102400
362579365 IamHereForFun E1 Feb. 12, 2026, 6:01 a.m. OK C++17 (GCC 7-32) TESTS 60 265 512000
362566212 potato167 E1 Feb. 12, 2026, 3:14 a.m. OK C++17 (GCC 7-32) TESTS 60 296 102400
362540802 Iron_china E1 Feb. 11, 2026, 7:22 p.m. OK C++17 (GCC 7-32) TESTS 60 843 225792000
362546135 Wansur E1 Feb. 11, 2026, 8:16 p.m. OK C++17 (GCC 7-32) TESTS 60 1593 142540800
362558200 kalimm E1 Feb. 12, 2026, 12:02 a.m. OK C++17 (GCC 7-32) TESTS 60 1640 82534400
362476539 keisuke6 E1 Feb. 11, 2026, 3:53 p.m. OK C++17 (GCC 7-32) TESTS 59 1875 102400
362490890 imirdy E1 Feb. 11, 2026, 4:18 p.m. OK C++20 (GCC 13-64) TESTS 59 62 24473600
362482143 __baozii__ E1 Feb. 11, 2026, 4:02 p.m. OK C++20 (GCC 13-64) TESTS 59 78 15257600
362543989 tsunk E1 Feb. 11, 2026, 7:52 p.m. OK C++20 (GCC 13-64) TESTS 60 109 102400
362538451 Noobish_Monk E1 Feb. 11, 2026, 7:02 p.m. OK C++20 (GCC 13-64) TESTS 60 109 48025600
362543692 tsunk E1 Feb. 11, 2026, 7:49 p.m. OK C++20 (GCC 13-64) TESTS 60 125 102400
362494823 OG_Matveychick1 E1 Feb. 11, 2026, 4:25 p.m. OK C++20 (GCC 13-64) TESTS 59 140 409600
362535101 shqrky E1 Feb. 11, 2026, 6:39 p.m. OK C++20 (GCC 13-64) TESTS 59 187 102400
362567924 yangchang E1 Feb. 12, 2026, 3:42 a.m. OK C++20 (GCC 13-64) TESTS 60 187 56320000
362510476 _Diu_ E1 Feb. 11, 2026, 4:57 p.m. OK C++20 (GCC 13-64) TESTS 59 203 83865600
362432262 EnofTaiPeople E1 Feb. 11, 2026, 2:55 p.m. OK C++20 (GCC 13-64) TESTS 59 203 99635200
362553572 CasseShimada E1 Feb. 11, 2026, 10:04 p.m. OK C++23 (GCC 14-64, msys2) TESTS 60 78 102400
362465561 VivaciousAubergine E1 Feb. 11, 2026, 3:36 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 93 4505600
362577450 limanjun E1 Feb. 12, 2026, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 60 109 102400
362520818 alyzha E1 Feb. 11, 2026, 5:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 109 102400
362546507 maspy E1 Feb. 11, 2026, 8:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 60 109 307200
362534730 Denisov E1 Feb. 11, 2026, 6:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 109 2150400
362492262 Radewoosh E1 Feb. 11, 2026, 4:20 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 109 12800000
362506289 anmichi E1 Feb. 11, 2026, 4:48 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 125 102400
362458935 maspy E1 Feb. 11, 2026, 3:27 p.m. OK C++23 (GCC 14-64, msys2) TESTS 59 125 307200
362564679 Maxduan E1 Feb. 12, 2026, 2:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 60 140 102400
362563385 smilences E1 Feb. 12, 2026, 2:18 a.m. OK PyPy 3-64 TESTS 60 828 39424000
362493833 Emikooh E1 Feb. 11, 2026, 4:23 p.m. OK PyPy 3-64 TESTS 59 1781 18022400
362505797 sansen E1 Feb. 11, 2026, 4:47 p.m. OK Rust 2021 TESTS 59 359 102400
362478056 Egor E1 Feb. 11, 2026, 3:56 p.m. OK Rust 2024 TESTS 59 109 11776000
362487534 Sugar_fan E1 Feb. 11, 2026, 4:12 p.m. OK Rust 2024 TESTS 59 421 178380800

remove filters

Back to search problems