Codeforces Round 1021 (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
2097 Codeforces Round 1021 (Div. 1) FINISHED False 10800 30749123 April 26, 2025, 8:35 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 529 ) D Homework PROGRAMMING bitmasks math matrices

Some teachers work at the educational center "Sirius" while simultaneously studying at the university. In this case, the trip does not exempt them from completing their homework, so they do their homework right on the plane. Artem is one of those teachers, and he was assigned the following homework at the university. With an arbitrary string (a) of even length (m), he can perform the following operation. Artem splits the string (a) into two halves (x) and (y) of equal length, after which he performs exactly one of three actions: For each (i \in \left\{ 1, 2, \ldots, \frac{m}{2}\right\}) assign (x_i = (x_i + y_i) \bmod 2); For each (i \in \left\{ 1, 2, \ldots, \frac{m}{2}\right\}) assign (y_i = (x_i + y_i) \bmod 2); Perform an arbitrary number of operations (the same operations defined above, applied recursively) on the strings (x) and (y), independently of each other. Note that in this case, the strings (x) and (y) must be of even length. Unfortunately, Artem fell asleep on the plane, so you will have to complete his homework. Artem has two binary strings (s) and (t) of length (n), each consisting of (n) characters 0 or 1 . Determine whether it is possible to make string (s) equal to string (t) with an arbitrary number of operations. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^5)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((1 \le n \le 10^6)) — the length of the strings (s) and (t). The second line of each test case contains the string (s) of length (n), consisting only of characters 0 and 1 . The third line of each test case contains the string (t) of length (n), consisting only of characters 0 and 1 . It is guaranteed that the sum of (n) over all test cases does not exceed (10^6). For each test case, out

Tutorials

142316

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
317409032 wzc_IOI_czw D April 27, 2025, 4:11 a.m. OK C++17 (GCC 7-32) TESTS 49 109 10137600
317325797 Entity069 D April 26, 2025, 11:30 a.m. OK C++17 (GCC 7-32) TESTS 49 124 1536000
317356768 amsraman D April 26, 2025, 3:48 p.m. OK C++17 (GCC 7-32) TESTS 49 155 102400
317313399 Morphed D April 26, 2025, 10:33 a.m. OK C++17 (GCC 7-32) TESTS 49 155 9113600
317409417 4927618350 D April 27, 2025, 4:20 a.m. OK C++17 (GCC 7-32) TESTS 49 155 43520000
317356072 amsraman D April 26, 2025, 3:40 p.m. OK C++17 (GCC 7-32) TESTS 49 156 102400
317294732 zjy2008 D April 26, 2025, 9:18 a.m. OK C++17 (GCC 7-32) TESTS 49 171 1536000
317315319 while_zeze D April 26, 2025, 10:42 a.m. OK C++17 (GCC 7-32) TESTS 49 171 26214400
317406821 4927618350 D April 27, 2025, 3:19 a.m. OK C++17 (GCC 7-32) TESTS 49 217 42188800
317413160 ywjylx D April 27, 2025, 5:35 a.m. OK C++17 (GCC 7-32) TESTS 49 218 24064000
317313581 fallleaves01 D April 26, 2025, 10:34 a.m. OK C++20 (GCC 13-64) TESTS 49 93 1331200
317316928 YocyCraft D April 26, 2025, 10:49 a.m. OK C++20 (GCC 13-64) TESTS 49 109 29286400
317321936 kevinyang D April 26, 2025, 11:13 a.m. OK C++20 (GCC 13-64) TESTS 49 140 1536000
317353849 cfhj D April 26, 2025, 3:18 p.m. OK C++20 (GCC 13-64) TESTS 49 140 62873600
317330438 bingpao D April 26, 2025, 12:11 p.m. OK C++20 (GCC 13-64) TESTS 49 140 86528000
317359676 jeroenodb D April 26, 2025, 4:21 p.m. OK C++20 (GCC 13-64) TESTS 49 155 3686400
317340149 BurnedChicken D April 26, 2025, 1:22 p.m. OK C++20 (GCC 13-64) TESTS 49 156 3686400
317317527 gloria_mundi D April 26, 2025, 10:52 a.m. OK C++20 (GCC 13-64) TESTS 49 156 40448000
317335020 Gun_park D April 26, 2025, 12:43 p.m. OK C++20 (GCC 13-64) TESTS 49 171 1228800
317352910 fishcathu. D April 26, 2025, 3:09 p.m. OK C++20 (GCC 13-64) TESTS 49 171 1331200
317333420 N_z__ D April 26, 2025, 12:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 49 109 204800
317315011 asgcd D April 26, 2025, 10:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 109 2355200
317317324 Daniel777 D April 26, 2025, 10:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 109 9830400
317399946 k1r1t0 D April 27, 2025, 12:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 124 1331200
317304957 Nyaan D April 26, 2025, 9:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 124 18022400
317315490 244mhq D April 26, 2025, 10:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 139 1331200
317312731 w2y51c318 D April 26, 2025, 10:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 139 12185600
317405239 xuyifei1 D April 27, 2025, 2:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 171 49459200
317309925 Halzion D April 26, 2025, 10:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 187 17715200
317346569 Halzion D April 26, 2025, 2:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 49 187 17817600
317367136 ahmedafeef D April 26, 2025, 5:32 p.m. OK GNU C11 TESTS 49 577 22630400
317296515 cyclop5 D April 26, 2025, 9:25 a.m. OK Go TESTS 49 328 48332800
317299435 arnabmanna D April 26, 2025, 9:35 a.m. OK Java 8 TESTS 49 1671 307200
317373603 SPD_9X2 D April 26, 2025, 6:22 p.m. OK PyPy 3 TESTS 49 655 14643200
317319330 chinerist D April 26, 2025, 11:01 a.m. OK PyPy 3-64 TESTS 49 343 16691200
317373280 SPD_9X2 D April 26, 2025, 6:19 p.m. OK PyPy 3-64 TESTS 49 405 15462400
317313212 harurun4635 D April 26, 2025, 10:33 a.m. OK PyPy 3-64 TESTS 49 483 16998400
317317608 smilences D April 26, 2025, 10:53 a.m. OK PyPy 3-64 TESTS 49 546 11468800
317409595 shinchankosen D April 27, 2025, 4:24 a.m. OK PyPy 3-64 TESTS 49 843 12697600
317373450 SPD_9X2 D April 26, 2025, 6:21 p.m. OK PyPy 3-64 TESTS 49 921 15257600
317319940 hirayuu_cf D April 26, 2025, 11:04 a.m. OK PyPy 3-64 TESTS 49 1780 197324800

remove filters

Back to search problems