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 |
|---|---|---|---|---|---|---|
| 2233 | Educational Codeforces Round 191 (Rated for Div. 2) | FINISHED | False | 7200 | 5585084 | June 9, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1166 ) | E2 | Permutation Transmission (Difficult Version) | PROGRAMMING | combinatorics sortings |
This is the difficult version of the problem. In this version, the upper bound on (n) and the sum of (n) over all test cases is (2 \cdot 10^5); furthermore, the maximum number of test cases is (10^4). There was a permutation (p) of size (n)(^{\text{∗}}). It was sent through a communication channel as follows: first, all (0)-th bits of each number (p_{i}) in the permutation were sent as one string of (n) characters 0 and/or 1 ; then the (1)-st bits were sent in the same format, and so on, up to the most significant bit of the number (n). For example, for (p = 3, 1, 2, 4), the following three strings were sent: " 1100 "; " 1010 "; " 0001 ". You received all these strings, but the order in which each string corresponded to a bit was lost, that is, the strings arrived in arbitrary order. In the example above, the strings could have arrived in the order " 1010 ", " 0001 ", and " 1100 ". Your task is to determine how many possible original permutations (p) could have been transmitted. It is possible that the data was corrupted during transmission, and then there is no valid original permutation (p). (^{\text{∗}})A permutation of size (n) is an array of size (n) where each integer from (1) to (n) appears exactly once. 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 one integer (n) ((1 \le n \le 2 \cdot 10^5)). The next (\lceil\log_2 (n + 1) \rceil) lines of each test case contain the transmitted data in the received order. Each line consists of (n) characters (0) and/or (1). Additional input constraints: the sum of (n) over all test cases does not exceed (2 \cdot 10^{5}). For each test case, print one integer — the answer to the problem. In the first example, there could be only one permutation |
| 154371 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 378024637 | namnam2303 | E2 | June 10, 2026, 2:09 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 46 | 8704000 | ||
| 377995596 | dsainvg | E2 | June 9, 2026, 4:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 62 | 2560000 | ||
| 378003026 | pranaybkangane.24 | E2 | June 9, 2026, 5:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 1228800 | ||
| 378058908 | chen_weilian | E2 | June 10, 2026, 9:27 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 1536000 | ||
| 377999037 | Marszpace | E2 | June 9, 2026, 4:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 2560000 | ||
| 378050302 | SkandaAithal | E2 | June 10, 2026, 8:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 2662400 | ||
| 378047946 | LA611 | E2 | June 10, 2026, 7:49 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 3276800 | ||
| 377997590 | MehrbodPoir | E2 | June 9, 2026, 4:42 p.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 4812800 | ||
| 378017172 | kalimm | E2 | June 9, 2026, 8:40 p.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 4915200 | ||
| 378079614 | Tony_Tung | E2 | June 10, 2026, 11:54 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 78 | 5632000 | ||
| 378144378 | yaaya | E2 | June 11, 2026, 4:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 46 | 4812800 | ||
| 378122240 | deudraNexus | E2 | June 10, 2026, 6:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 46 | 12800000 | ||
| 378030394 | Piggy07 | E2 | June 10, 2026, 4:08 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 2355200 | ||
| 378045899 | AthJa | E2 | June 10, 2026, 7:29 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 3174400 | ||
| 378011600 | Jelefy | E2 | June 9, 2026, 7:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 5120000 | ||
| 378136014 | TuanKiet2004 | E2 | June 11, 2026, 1:31 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 5427200 | ||
| 378046255 | Ghammaz-Hassan | E2 | June 10, 2026, 7:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 9216000 | ||
| 378020381 | thisislike_fan | E2 | June 9, 2026, 10:21 p.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 9523200 | ||
| 378033966 | vedic86 | E2 | June 10, 2026, 5:06 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 9932800 | ||
| 378044511 | sbsb114 | E2 | June 10, 2026, 7:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 62 | 17612800 | ||
| 378031511 | angeliayam | E2 | June 10, 2026, 4:28 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 46 | 2150400 | ||
| 378048363 | M.H.N | E2 | June 10, 2026, 7:52 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 46 | 3276800 | ||
| 378098726 | Illyasv1el | E2 | June 10, 2026, 2:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1638400 | ||
| 378092842 | tkt0506tkt | E2 | June 10, 2026, 1:55 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1638400 | ||
| 378046430 | eLaG3nX | E2 | June 10, 2026, 7:34 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1740800 | ||
| 378113664 | r0gue_shinobi | E2 | June 10, 2026, 5:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1843200 | ||
| 378025680 | dooglius | E2 | June 10, 2026, 2:36 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1843200 | ||
| 378024006 | jtrh | E2 | June 10, 2026, 1:50 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 1843200 | ||
| 378060597 | shanyikai | E2 | June 10, 2026, 9:42 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 2150400 | ||
| 378043125 | _bro_ | E2 | June 10, 2026, 7:05 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 47 | 62 | 2252800 | ||
| 378129105 | loveax | E2 | June 10, 2026, 8:54 p.m. | OK | GNU C11 | TESTS | 47 | 62 | 3993600 | ||
| 378044886 | js_chatura | E2 | June 10, 2026, 7:20 a.m. | OK | Go | TESTS | 47 | 109 | 10649600 | ||
| 377996135 | gitgudgud | E2 | June 9, 2026, 4:34 p.m. | OK | Go | TESTS | 47 | 296 | 75571200 | ||
| 378019198 | hg_2005 | E2 | June 9, 2026, 9:36 p.m. | OK | Java 21 | TESTS | 47 | 328 | 921600 | ||
| 377998974 | jamshed20 | E2 | June 9, 2026, 4:52 p.m. | OK | Java 21 | TESTS | 47 | 375 | 33382400 | ||
| 378013084 | aditya.yashovardhan21 | E2 | June 9, 2026, 7:26 p.m. | OK | Java 21 | TESTS | 47 | 406 | 1331200 | ||
| 378009941 | nesco | E2 | June 9, 2026, 6:44 p.m. | OK | Kotlin 2.2 | TESTS | 47 | 312 | 2150400 | ||
| 378058443 | chinesedfan | E2 | June 10, 2026, 9:23 a.m. | OK | Node.js | TESTS | 47 | 328 | 24985600 | ||
| 377995874 | sleepisweak | E2 | June 9, 2026, 4:34 p.m. | OK | Node.js | TESTS | 47 | 468 | 21196800 | ||
| 378024898 | ramumali2002 | E2 | June 10, 2026, 2:16 a.m. | OK | PyPy 3 | TESTS | 47 | 484 | 9932800 | ||
| 378102325 | devs69 | E2 | June 10, 2026, 3:30 p.m. | OK | PyPy 3-64 | TESTS | 47 | 125 | 13619200 | ||
| 378027632 | kamio-misuzu | E2 | June 10, 2026, 3:18 a.m. | OK | PyPy 3-64 | TESTS | 47 | 171 | 13209600 | ||
| 378141143 | molongdadi | E2 | June 11, 2026, 3:45 a.m. | OK | PyPy 3-64 | TESTS | 47 | 171 | 16793600 | ||
| 378054946 | Nikrien | E2 | June 10, 2026, 8:53 a.m. | OK | PyPy 3-64 | TESTS | 47 | 187 | 12185600 | ||
| 378059177 | _______________________ | E2 | June 10, 2026, 9:29 a.m. | OK | PyPy 3-64 | TESTS | 47 | 203 | 10956800 | ||
| 378101027 | wasbee | E2 | June 10, 2026, 3:16 p.m. | OK | PyPy 3-64 | TESTS | 47 | 203 | 13414400 | ||
| 377998442 | b42969441 | E2 | June 9, 2026, 4:48 p.m. | OK | PyPy 3-64 | TESTS | 47 | 250 | 11776000 | ||
| 378011318 | iwonit | E2 | June 9, 2026, 7:01 p.m. | OK | PyPy 3-64 | TESTS | 47 | 281 | 17920000 | ||
| 378123070 | jaideep01 | E2 | June 10, 2026, 7:01 p.m. | OK | PyPy 3-64 | TESTS | 47 | 312 | 11673600 | ||
| 378097334 | golomb | E2 | June 10, 2026, 2:38 p.m. | OK | PyPy 3-64 | TESTS | 47 | 328 | 35225600 | ||
| 378093154 | Galaxy_prince | E2 | June 10, 2026, 1:58 p.m. | OK | Python 3 | TESTS | 47 | 515 | 13312000 | ||
| 378118684 | noob-_- | E2 | June 10, 2026, 6:12 p.m. | OK | Python 3 | TESTS | 47 | 515 | 21504000 | ||
| 378019883 | Akshatgupta069_069 | E2 | June 9, 2026, 10:02 p.m. | OK | Python 3 | TESTS | 47 | 1125 | 13516800 | ||
| 378044714 | chmpro | E2 | June 10, 2026, 7:19 a.m. | OK | Python 3 | TESTS | 47 | 1312 | 21811200 | ||
| 377995909 | cvs-650 | E2 | June 9, 2026, 4:34 p.m. | OK | Rust 2024 | TESTS | 47 | 62 | 1740800 |
Back to search problems