Codeforces Round 937 (Div. 4)

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
1950 Codeforces Round 937 (Div. 4) FINISHED False 8100 25542863 March 28, 2024, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15085 ) E Nearly Shortest Repeating Substring PROGRAMMING brute force implementation number theory strings

B'You are given a string s of length n consisting of lowercase Latin characters. Find the length of the shortest string k such that several (possibly one) copies of k can be concatenated together to form a string with the same length as s and, at most, one different character. More formally, find the length of the shortest string k such that c = underbrace{k + cdots + k}_{x rm text{times}} for some positive integer x , strings s and c has the same length and c_i neq s_i for at most one i (i.e. there exist 0 or 1 such positions). The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot10^5 ) -- the length of string s . The second line of each test case contains the string s , consisting of lowercase Latin characters. The sum of n over all test cases does not exceed 2 cdot10^5 . For each test case, print the length of the shortest string k satisfying the constraints in the statement. In the first test case, you can select k = texttt{a} and k+k+k+k = texttt{aaaa} , which only differs from s in the second position. In the second test case, you cannot select k of length one or two. We can have k = texttt{abba} , which is equal to s . '...

Tutorials

Codeforces Round 937 (Div. 4) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
253877808 AutumnMist E March 29, 2024, 3:19 a.m. OK C# 10 TESTS 15 61 7065600
253859553 Anastasiya_Andreevna E March 28, 2024, 9:42 p.m. OK C# 10 TESTS 15 93 921600
253868568 hnust_lixuyun E March 29, 2024, 12:36 a.m. OK C++14 (GCC 6-32) TESTS 15 15 512000
253846157 rawalevedant E March 28, 2024, 7:16 p.m. OK C++14 (GCC 6-32) TESTS 15 15 512000
253887150 XingRin E March 29, 2024, 5:16 a.m. OK C++14 (GCC 6-32) TESTS 15 31 307200
253891020 Lenvil E March 29, 2024, 5:51 a.m. OK C++14 (GCC 6-32) TESTS 15 31 512000
253885298 OvOytz E March 29, 2024, 4:57 a.m. OK C++14 (GCC 6-32) TESTS 15 31 512000
253873296 xiaoxiao__ E March 29, 2024, 2:09 a.m. OK C++14 (GCC 6-32) TESTS 15 31 512000
253872355 Simple_Hanhan E March 29, 2024, 1:52 a.m. OK C++14 (GCC 6-32) TESTS 15 31 512000
253849332 Darshanraj E March 28, 2024, 7:45 p.m. OK C++14 (GCC 6-32) TESTS 15 31 512000
253882400 Xujj E March 29, 2024, 4:23 a.m. OK C++14 (GCC 6-32) TESTS 15 31 1024000
253855070 Mostofa_Meem E March 28, 2024, 8:43 p.m. OK C++14 (GCC 6-32) TESTS 15 31 1331200
253888490 p_singh12 E March 29, 2024, 5:29 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253877960 ngoalong10tn22001 E March 29, 2024, 3:21 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253875923 ustcyyw E March 29, 2024, 2:51 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253875720 Sparkle_Twilight E March 29, 2024, 2:48 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253871886 SamuelTull E March 29, 2024, 1:43 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253871664 GunSJ E March 29, 2024, 1:38 a.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253867001 Savoura E March 29, 2024, midnight OK C++17 (GCC 7-32) TESTS 15 15 512000
253859369 im.priyansh E March 28, 2024, 9:39 p.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253854876 MandaCR7 E March 28, 2024, 8:41 p.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253852538 Shady_Mo E March 28, 2024, 8:16 p.m. OK C++17 (GCC 7-32) TESTS 15 15 512000
253891583 Saurav8102 E March 29, 2024, 5:56 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253887545 YukidarumaMello E March 29, 2024, 5:20 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253882752 zhiye E March 29, 2024, 4:27 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253882579 ThunderK1ng E March 29, 2024, 4:25 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253881341 IR101 E March 29, 2024, 4:10 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253876067 Darsh_Jain E March 29, 2024, 2:54 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253875491 Donbcheap E March 29, 2024, 2:44 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253874857 anxr E March 29, 2024, 2:34 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253871579 Fr1nGeLove E March 29, 2024, 1:36 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253871133 miniewa E March 29, 2024, 1:27 a.m. OK C++20 (GCC 13-64) TESTS 15 15 512000
253858243 NenadDapic E March 28, 2024, 9:24 p.m. OK FPC TESTS 15 202 29388800
253858734 NenadDapic E March 28, 2024, 9:31 p.m. OK FPC TESTS 15 218 29286400
253857963 NenadDapic E March 28, 2024, 9:20 p.m. OK FPC TESTS 15 327 24780800
253843196 TianMeng30 E March 28, 2024, 6:50 p.m. OK GNU C11 TESTS 15 31 512000
253859101 antnmxmv E March 28, 2024, 9:36 p.m. OK Go TESTS 15 46 4096000
253872418 xiao___Y E March 29, 2024, 1:53 a.m. OK Go TESTS 15 61 5836800
253860686 AKhacks E March 28, 2024, 10 p.m. OK Java 21 TESTS 15 249 204800
253860635 Fareedah E March 28, 2024, 9:59 p.m. OK Java 21 TESTS 15 265 0
253845712 SweetAsCocaine E March 28, 2024, 7:12 p.m. OK Java 21 TESTS 15 265 307200
253886951 Siddharth_Singh_here E March 29, 2024, 5:14 a.m. OK Java 21 TESTS 15 280 204800
253871585 Siddharth_78 E March 29, 2024, 1:37 a.m. OK Java 21 TESTS 15 280 1740800
253884442 Surpass_Your_Limits E March 29, 2024, 4:46 a.m. OK Java 21 TESTS 15 295 307200
253881959 yang_wei E March 29, 2024, 4:18 a.m. OK Java 21 TESTS 15 296 0
253866042 rj3377295 E March 28, 2024, 11:40 p.m. OK Java 21 TESTS 15 311 0
253845110 Dexory E March 28, 2024, 7:07 p.m. OK Java 21 TESTS 15 311 512000
253853093 Raging_Shashank E March 28, 2024, 8:22 p.m. OK Java 21 TESTS 15 311 716800
253884008 iamRajnish E March 29, 2024, 4:41 a.m. OK Java 8 TESTS 15 109 0
253872715 ygming E March 29, 2024, 1:59 a.m. OK Java 8 TESTS 15 124 0
253837089 vatsal_04 E March 28, 2024, 6:05 p.m. OK Java 8 TESTS 15 139 0
253891589 faresbadr316 E March 29, 2024, 5:56 a.m. OK Java 8 TESTS 15 140 0
253878830 NerfThis E March 29, 2024, 3:34 a.m. OK Java 8 TESTS 15 140 0
253877063 coderman2004 E March 29, 2024, 3:08 a.m. OK Java 8 TESTS 15 140 0
253890593 murtaza_mister E March 29, 2024, 5:47 a.m. OK Java 8 TESTS 15 156 0
253878125 Freedom_lifelong E March 29, 2024, 3:24 a.m. OK Java 8 TESTS 15 171 0
253841604 achyut88 E March 28, 2024, 6:39 p.m. OK Java 8 TESTS 15 171 0
253842819 Sumitsingh7 E March 28, 2024, 6:47 p.m. OK Java 8 TESTS 15 171 6451200
253836538 Sovi_11 E March 28, 2024, 6:01 p.m. OK PyPy 3 TESTS 15 233 7168000
253843702 sinhatushar334 E March 28, 2024, 6:54 p.m. OK PyPy 3 TESTS 15 233 8089600
253876866 Aswathy_A_R E March 29, 2024, 3:05 a.m. OK PyPy 3 TESTS 15 249 5734400
253852338 RatanPrakash E March 28, 2024, 8:14 p.m. OK PyPy 3 TESTS 15 264 9728000
253840655 PhanDinhKhoi E March 28, 2024, 6:32 p.m. OK PyPy 3 TESTS 15 311 6656000
253854362 masterWaiter E March 28, 2024, 8:36 p.m. OK PyPy 3 TESTS 15 312 17100800
253891173 ievg E March 29, 2024, 5:53 a.m. OK PyPy 3-64 TESTS 15 109 5529600
253883626 _yoru_ E March 29, 2024, 4:37 a.m. OK PyPy 3-64 TESTS 15 124 5222400
253891077 ievg E March 29, 2024, 5:52 a.m. OK PyPy 3-64 TESTS 15 124 5836800
253882533 yertugan06 E March 29, 2024, 4:25 a.m. OK PyPy 3-64 TESTS 15 124 6963200
253883474 yertugan06 E March 29, 2024, 4:35 a.m. OK PyPy 3-64 TESTS 15 124 7168000
253844675 DeadMan69 E March 28, 2024, 7:03 p.m. OK PyPy 3-64 TESTS 15 124 13414400
253840920 _twi_nami E March 28, 2024, 6:34 p.m. OK PyPy 3-64 TESTS 15 140 6860800
253890963 Youarenotgood E March 29, 2024, 5:51 a.m. OK PyPy 3-64 TESTS 15 155 9318400
253866383 theRealChainman E March 28, 2024, 11:47 p.m. OK PyPy 3-64 TESTS 15 156 10240000
253864977 Sersawy E March 28, 2024, 11:19 p.m. OK PyPy 3-64 TESTS 15 170 8704000
253882641 adityayv_0001 E March 29, 2024, 4:26 a.m. OK Python 3 TESTS 15 77 409600
253845843 samyaksrivastava9 E March 28, 2024, 7:14 p.m. OK Python 3 TESTS 15 78 1126400
253849969 GM_Mo17 E March 28, 2024, 7:51 p.m. OK Python 3 TESTS 15 93 409600
253877992 saikiranreddymekala28 E March 29, 2024, 3:22 a.m. OK Python 3 TESTS 15 108 1228800
253858845 4jmodi E March 28, 2024, 9:32 p.m. OK Python 3 TESTS 15 124 409600
253870097 daveshub E March 29, 2024, 1:08 a.m. OK Python 3 TESTS 15 124 716800
253864289 wyjsdpku E March 28, 2024, 11:05 p.m. OK Python 3 TESTS 15 125 6656000
253845255 divyamgoyal E March 28, 2024, 7:08 p.m. OK Python 3 TESTS 15 140 409600
253850023 Arshdeep E March 28, 2024, 7:52 p.m. OK Python 3 TESTS 15 156 614400
253854253 harshkankhar1 E March 28, 2024, 8:34 p.m. OK Python 3 TESTS 15 186 2252800
253840878 gkawa E March 28, 2024, 6:34 p.m. OK Rust 2021 TESTS 15 62 614400
253835712 vstiff E March 28, 2024, 5:55 p.m. OK Rust 2021 TESTS 15 93 819200

remove filters

Back to search problems