Codeforces Round 1078 (Div. 2)

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
2194 Codeforces Round 1078 (Div. 2) FINISHED False 7200 5864123 Feb. 8, 2026, 9:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 10708 ) C Secret message PROGRAMMING bitmasks math

Bob, the genius spy, has intercepted an encrypted message. He assumes that it contains secret information and is actively engaged in deciphering it. The note, which has fallen into the hands of the spy, consists of (k) strips, each of length (n) and containing strict lowercase Latin letters. With extensive experience in deciphering such documents, Bob guessed that the message he is interested in (the deciphering of the note) is also a string of length (n), and the (i)-th letter of this message corresponds to the (i)-th letter of one of the strips. According to Bob, the informativity of a string (s) is defined as the minimum positive integer (d) such that a string (t) of length (d) exists, and (s) can be formed by repeating (t) several times. For example, the informativity of the string " aaaa " is 1, the informativity of the string " abab " is 2, and the informativity of the string " abcd " is 4. Bob assumes that the note's author, to ensure reliable transmission of information, repeated the data in the message several times. Therefore, he believes that a more plausible decryption of the note would have the smallest possible informativity. Help the spy: find the message that represents the decryption of the note and has the minimum possible informativity. 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. In the first line of each test case, there are numbers (n) and (k) ((2 \leq n, k \leq 50\,000, 4 \leq n \cdot k \leq 10^5)) — the length of the strips of paper and the number of strips. In each of the following (k) lines of each test case, there is a sequence of (n) lowercase Latin letters — the next strip. It is guaranteed that the sum (n \cdot k) across all test cases does not exceed (10^5) For each test case, output a string of length (n) — the decryption of the no

Tutorials

Codeforces Round #1078 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
362053975 papa_joo C Feb. 8, 2026, 8:07 p.m. OK C# 13 TESTS 20 62 5324800
361993306 ya_hossein C Feb. 8, 2026, 10:49 a.m. OK C# 13 TESTS 20 812 43212800
362019969 BaiLi_nya C Feb. 8, 2026, 2:53 p.m. OK C++17 (GCC 7-32) TESTS 20 31 0
361999956 shivr01 C Feb. 8, 2026, 11:04 a.m. OK C++17 (GCC 7-32) TESTS 20 31 0
361997494 vikashrajvarun C Feb. 8, 2026, 10:59 a.m. OK C++17 (GCC 7-32) TESTS 20 31 0
362055165 Dimozavr C Feb. 8, 2026, 8:26 p.m. OK C++17 (GCC 7-32) TESTS 20 31 102400
361999491 argh25a C Feb. 8, 2026, 11:04 a.m. OK C++17 (GCC 7-32) TESTS 20 31 102400
361994909 abdelmajid_brini C Feb. 8, 2026, 10:53 a.m. OK C++17 (GCC 7-32) TESTS 20 31 102400
362071630 jiawenzhuo C Feb. 9, 2026, 3:32 a.m. OK C++17 (GCC 7-32) TESTS 20 31 307200
362074655 ignifi C Feb. 9, 2026, 4:25 a.m. OK C++17 (GCC 7-32) TESTS 20 31 512000
362071762 vniharika33 C Feb. 9, 2026, 3:35 a.m. OK C++17 (GCC 7-32) TESTS 20 46 0
362071759 tomQian C Feb. 9, 2026, 3:35 a.m. OK C++17 (GCC 7-32) TESTS 20 46 0
362078928 Viee C Feb. 9, 2026, 5:26 a.m. OK C++20 (GCC 13-64) TESTS 20 31 0
362046142 linkyless C Feb. 8, 2026, 6:29 p.m. OK C++20 (GCC 13-64) TESTS 20 31 0
362040594 wabca C Feb. 8, 2026, 5:37 p.m. OK C++20 (GCC 13-64) TESTS 20 31 0
361999585 ShadowSentinel C Feb. 8, 2026, 11:04 a.m. OK C++20 (GCC 13-64) TESTS 20 31 0
361998978 vuhuyducanh C Feb. 8, 2026, 11:03 a.m. OK C++20 (GCC 13-64) TESTS 20 31 0
362079234 linlic C Feb. 9, 2026, 5:30 a.m. OK C++20 (GCC 13-64) TESTS 20 31 102400
362076433 tilek9602 C Feb. 9, 2026, 4:52 a.m. OK C++20 (GCC 13-64) TESTS 20 31 102400
362068293 ar_parchi_na C Feb. 9, 2026, 2:26 a.m. OK C++20 (GCC 13-64) TESTS 20 31 102400
362061593 yumkam C Feb. 8, 2026, 10:57 p.m. OK C++20 (GCC 13-64) TESTS 20 31 102400
362045443 MrBruceWayne C Feb. 8, 2026, 6:22 p.m. OK C++20 (GCC 13-64) TESTS 20 31 102400
362055184 twin_brain C Feb. 8, 2026, 8:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
362019013 jiangly C Feb. 8, 2026, 2:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
362016888 guanglongshen C Feb. 8, 2026, 2:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
361999855 jeevank_404 C Feb. 8, 2026, 11:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
361999568 ANandkumar19 C Feb. 8, 2026, 11:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
361993563 Daniyal.BK C Feb. 8, 2026, 10:50 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 0
362082371 EndpoInt C Feb. 9, 2026, 6:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 102400
362075200 molongdadi C Feb. 9, 2026, 4:33 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 102400
362066707 xkgc C Feb. 9, 2026, 1:47 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 102400
362062519 AbdoMO C Feb. 8, 2026, 11:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 31 102400
362047089 NenadDapic C Feb. 8, 2026, 6:40 p.m. OK FPC TESTS 20 62 1740800
362050678 NenadDapic C Feb. 8, 2026, 7:22 p.m. OK FPC TESTS 20 171 5939200
362050224 NenadDapic C Feb. 8, 2026, 7:17 p.m. OK FPC TESTS 20 171 5939200
361997723 ruban C Feb. 8, 2026, 11 a.m. OK FPC TESTS 20 1312 253030400
361997490 Sahilsaini_cf C Feb. 8, 2026, 10:59 a.m. OK GNU C11 TESTS 20 46 204800
361995839 _laksh__ C Feb. 8, 2026, 10:55 a.m. OK GNU C11 TESTS 20 78 307200
361995969 Akshith_cdr C Feb. 8, 2026, 10:56 a.m. OK GNU C11 TESTS 20 78 409600
361999705 warrior66766 C Feb. 8, 2026, 11:04 a.m. OK GNU C11 TESTS 20 218 1228800
361994084 petsernik C Feb. 8, 2026, 10:51 a.m. OK Go TESTS 20 2000 175411200
362076781 code_manik C Feb. 9, 2026, 4:57 a.m. OK Java 21 TESTS 20 203 921600
361996399 drv8080 C Feb. 8, 2026, 10:57 a.m. OK Java 21 TESTS 20 218 204800
362038091 OR-222 C Feb. 8, 2026, 5:14 p.m. OK Java 21 TESTS 20 218 512000
362030325 JC_codescf C Feb. 8, 2026, 4:15 p.m. OK Java 21 TESTS 20 218 614400
361999731 subhojit.is.my.name C Feb. 8, 2026, 11:04 a.m. OK Java 21 TESTS 20 218 1024000
362034411 Ayush_Chauhan025 C Feb. 8, 2026, 4:53 p.m. OK Java 21 TESTS 20 218 1228800
362074169 harsh_indoria C Feb. 9, 2026, 4:17 a.m. OK Java 21 TESTS 20 218 1536000
361994842 Gitansh_shekhar C Feb. 8, 2026, 10:53 a.m. OK Java 21 TESTS 20 234 1126400
362021916 pavan18 C Feb. 8, 2026, 3:07 p.m. OK Java 21 TESTS 20 234 1433600
362079322 Azad_Singh C Feb. 9, 2026, 5:31 a.m. OK Java 21 TESTS 20 250 307200
361996912 amanxsays C Feb. 8, 2026, 10:58 a.m. OK Java 8 TESTS 20 140 0
361996330 d1n0Codes C Feb. 8, 2026, 10:57 a.m. OK Java 8 TESTS 20 140 0
362045088 Aman_knight C Feb. 8, 2026, 6:19 p.m. OK Java 8 TESTS 20 156 0
362021975 Yaser2004 C Feb. 8, 2026, 3:08 p.m. OK Java 8 TESTS 20 187 0
361997621 niharikas18 C Feb. 8, 2026, 11 a.m. OK Java 8 TESTS 20 218 0
362035171 abhishek1445 C Feb. 8, 2026, 4:59 p.m. OK Java 8 TESTS 20 265 0
362076055 NE0b01 C Feb. 9, 2026, 4:46 a.m. OK Java 8 TESTS 20 359 0
362043140 Satyam2106 C Feb. 8, 2026, 6:01 p.m. OK Java 8 TESTS 20 359 0
361995831 vibhanshud C Feb. 8, 2026, 10:55 a.m. OK Java 8 TESTS 20 421 0
361995747 abhayrajnegi0416 C Feb. 8, 2026, 10:55 a.m. OK Java 8 TESTS 20 468 5017600
362022491 Lakshay_Arya C Feb. 8, 2026, 3:12 p.m. OK PyPy 3 TESTS 20 515 16588800
361998217 utsab77 C Feb. 8, 2026, 11:01 a.m. OK PyPy 3 TESTS 20 1218 12697600
361994347 joker_1394 C Feb. 8, 2026, 10:52 a.m. OK PyPy 3 TESTS 20 1453 11571200
361994974 golovanebolin C Feb. 8, 2026, 10:53 a.m. OK PyPy 3 TESTS 20 1812 10752000
362035259 NiteeshSingh C Feb. 8, 2026, 5 p.m. OK PyPy 3-64 TESTS 20 93 5734400
362081926 TralSun C Feb. 9, 2026, 6 a.m. OK PyPy 3-64 TESTS 20 140 7680000
362035522 unknownSolver C Feb. 8, 2026, 5:03 p.m. OK PyPy 3-64 TESTS 20 140 9523200
361999587 TralSun C Feb. 8, 2026, 11:04 a.m. OK PyPy 3-64 TESTS 20 156 7065600
362038754 unknownSolver C Feb. 8, 2026, 5:21 p.m. OK PyPy 3-64 TESTS 20 156 16588800
362037896 Sarthichavhan C Feb. 8, 2026, 5:13 p.m. OK PyPy 3-64 TESTS 20 171 7168000
361998087 bentengly C Feb. 8, 2026, 11:01 a.m. OK PyPy 3-64 TESTS 20 171 8908800
362044162 Sheikah C Feb. 8, 2026, 6:10 p.m. OK PyPy 3-64 TESTS 20 171 9420800
362056981 PiMat_ C Feb. 8, 2026, 9 p.m. OK PyPy 3-64 TESTS 20 187 8499200
362028835 Rendom C Feb. 8, 2026, 4:02 p.m. OK PyPy 3-64 TESTS 20 187 9420800
362028349 Khuong_Xd C Feb. 8, 2026, 3:58 p.m. OK Python 3 TESTS 20 390 4096000
362063474 Ne_xt_ C Feb. 9, 2026, 12:04 a.m. OK Python 3 TESTS 20 390 5529600
361994896 vsvsvsarma C Feb. 8, 2026, 10:53 a.m. OK Python 3 TESTS 20 484 4096000
362032511 iarno_7 C Feb. 8, 2026, 4:35 p.m. OK Python 3 TESTS 20 500 5017600
361994459 ItsVoyager C Feb. 8, 2026, 10:52 a.m. OK Python 3 TESTS 20 546 3379200
362058778 Mellonka C Feb. 8, 2026, 9:37 p.m. OK Python 3 TESTS 20 656 2867200
361998314 lsx520 C Feb. 8, 2026, 11:01 a.m. OK Python 3 TESTS 20 718 5836800
362037722 GUIJ C Feb. 8, 2026, 5:11 p.m. OK Python 3 TESTS 20 1046 18022400
361998340 Shanmukh08 C Feb. 8, 2026, 11:01 a.m. OK Python 3 TESTS 20 1078 3993600
361995572 baobab1 C Feb. 8, 2026, 10:55 a.m. OK Python 3 TESTS 20 1078 13619200
362033933 Spheniscine C Feb. 8, 2026, 4:48 p.m. OK Rust 2021 TESTS 20 31 102400
362062597 weiqizheng C Feb. 8, 2026, 11:34 p.m. OK Rust 2024 TESTS 20 46 11776000
362003596 vanshit C Feb. 8, 2026, 12:05 p.m. OK Rust 2024 TESTS 20 93 5632000
361993093 GaLLium31 C Feb. 8, 2026, 10:48 a.m. OK Rust 2024 TESTS 20 250 11776000
361997026 samyakuza C Feb. 8, 2026, 10:58 a.m. OK Rust 2024 TESTS 20 437 0

remove filters

Back to search problems