Codeforces Round 146 (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
235 Codeforces Round 146 (Div. 1) FINISHED False 7200 386376563 Oct. 21, 2012, 7:10 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2172 ) C Cyclical Quest PROGRAMMING data structures string suffix structures strings 2700

B'Some days ago, WJMZBMR learned how to answer the query "how many times does a string x occur in a string s" quickly by preprocessing the string s. But now he wants to make it harder. So he wants to ask "how many consecutive substrings of s are cyclical isomorphic to a given string x". You are given string s and n strings xi, for each string xi find, how many consecutive substrings of s are cyclical isomorphic to xi. Two strings are called cyclical isomorphic if one can rotate one string to get the other one. 'Rotate ' here means 'to take some consecutive chars (maybe none) from the beginning of a string and put them back at the end of the string in the same order '. For example, string "abcde" can be rotated to string "deabc". We can take characters "abc" from the beginning and put them at the end of "de". The first line contains a non-empty string s. The length of string s is not greater than 106 characters. The second line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of queries. Then n lines follow: the i-th line contains the string xi -- the string for the i-th query. The total length of xi is less than or equal to 106 characters. In this problem, strings only consist of lowercase English letters. For each query xi print a single integer that shows how many consecutive substrings of s are cyclical isomorphic to xi. Print the answers to the queries in the order they are given in the input.'...

Tutorials

Codeforces Round #146 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52145456 ouuan C April 1, 2019, 9:05 a.m. OK Clang++17 Diagnostics TESTS 84 935 266137600 2700
52144684 ouuan C April 1, 2019, 8:43 a.m. OK Clang++17 Diagnostics TESTS 84 982 266137600 2700
52143212 ouuan C April 1, 2019, 7:56 a.m. OK Clang++17 Diagnostics TESTS 84 982 266137600 2700
11633829 ljz C June 18, 2015, 2:10 p.m. OK FPC TESTS 84 482 330956800 2700
11633820 ljz C June 18, 2015, 2:09 p.m. OK FPC TESTS 84 483 330956800 2700
11633863 ljz C June 18, 2015, 2:12 p.m. OK FPC TESTS 84 498 411033600 2700
11633772 ljz C June 18, 2015, 2:05 p.m. OK FPC TESTS 84 499 330956800 2700
11633836 ljz C June 18, 2015, 2:10 p.m. OK FPC TESTS 84 546 330956800 2700
26573856 mostcleverboy C April 22, 2017, 3:45 a.m. OK FPC TESTS 84 2870 379801600 2700
25371195 Spylft C March 10, 2017, 1:16 a.m. OK GNU C++ TESTS 84 139 260608000 2700
35889159 2016gdgzoi471 C March 3, 2018, 2:35 p.m. OK GNU C++ TESTS 84 140 256512000 2700
40862881 vjudge3 C July 28, 2018, 12:21 a.m. OK GNU C++ TESTS 84 140 258355200 2700
28400050 mayaohua2003 C July 10, 2017, 6:44 a.m. OK GNU C++ TESTS 84 140 260403200 2700
35588752 spliey C Feb. 23, 2018, 5:25 a.m. OK GNU C++ TESTS 84 140 260608000 2700
25340200 songyiqun C March 8, 2017, 11:49 a.m. OK GNU C++ TESTS 84 140 268595200 2700
35750366 iotang C Feb. 27, 2018, 3:26 a.m. OK GNU C++ TESTS 84 140 325324800 2700
39269497 none44353 C June 15, 2018, 3 p.m. OK GNU C++ TESTS 84 155 250470400 2700
27691005 HbFS- C June 9, 2017, 2:26 p.m. OK GNU C++ TESTS 84 155 250777600 2700
34237781 vjudge5 C Jan. 17, 2018, 1:26 a.m. OK GNU C++ TESTS 84 155 254566400 2700
7943185 equation314 C Sept. 25, 2014, 7:35 a.m. OK GNU C++0x TESTS 84 233 258560000 2700
7201211 wodesuck C July 22, 2014, 9:54 a.m. OK GNU C++0x TESTS 84 249 254464000 2700
9232429 nblt C Dec. 23, 2014, 12:05 p.m. OK GNU C++0x TESTS 84 280 413081600 2700
7617830 Plumrain C Aug. 29, 2014, 2:06 a.m. OK GNU C++0x TESTS 84 295 261529600 2700
9540035 fenzhang C Jan. 24, 2015, 3:59 p.m. OK GNU C++0x TESTS 84 311 287846400 2700
9540012 fenzhang C Jan. 24, 2015, 3:57 p.m. OK GNU C++0x TESTS 84 342 287846400 2700
7487094 andrew.volchek C Aug. 16, 2014, 8:05 p.m. OK GNU C++0x TESTS 84 358 247500800 2700
9960610 fwm94 C Feb. 22, 2015, 3:16 p.m. OK GNU C++0x TESTS 84 358 295116800 2700
9816131 zxc901 C Feb. 13, 2015, 12:58 p.m. OK GNU C++0x TESTS 84 373 269619200 2700
5093041 lopek C Nov. 13, 2013, 9:27 p.m. OK GNU C++0x TESTS 84 404 263884800 2700
33995926 ysf C Jan. 8, 2018, 2:24 a.m. OK GNU C++11 TESTS 84 124 268390400 2700
49061904 LJC00118 C Jan. 27, 2019, 3:50 p.m. OK GNU C++11 TESTS 84 139 258560000 2700
32378392 superguymj C Nov. 17, 2017, 12:43 p.m. OK GNU C++11 TESTS 84 139 260300800 2700
48096547 reku C Jan. 8, 2019, 5:12 p.m. OK GNU C++11 TESTS 84 139 262553600 2700
60472710 helloacm C Sept. 13, 2019, 6:27 a.m. OK GNU C++11 TESTS 84 140 253542400 2700
46586130 xxccxcxc C Dec. 4, 2018, 1:22 p.m. OK GNU C++11 TESTS 84 140 255590400 2700
26535389 shijieyywd C April 21, 2017, 10:37 a.m. OK GNU C++11 TESTS 84 140 257638400 2700
59381816 lyzqs C Aug. 24, 2019, 3:44 a.m. OK GNU C++11 TESTS 84 140 258560000 2700
48387017 _Dispwnl C Jan. 14, 2019, 1:34 p.m. OK GNU C++11 TESTS 84 140 258560000 2700
48322225 daniel14311531 C Jan. 13, 2019, 9:58 a.m. OK GNU C++11 TESTS 84 140 258560000 2700
27671252 RNS_JKS C June 8, 2017, 12:33 p.m. OK GNU C++14 TESTS 84 140 260812800 2700
23357379 LAGBOYDaD3zZ C Dec. 27, 2016, 10:52 a.m. OK GNU C++14 TESTS 84 155 264396800 2700
25361701 vjudge2 C March 9, 2017, 2:01 p.m. OK GNU C++14 TESTS 84 155 284467200 2700
25361674 SssssssssssssbbbBBBB C March 9, 2017, 2 p.m. OK GNU C++14 TESTS 84 155 284467200 2700
40931798 Deluxurous C July 30, 2018, 1:21 a.m. OK GNU C++14 TESTS 84 155 521011200 2700
37574113 DOlaBMOon C April 24, 2018, 1:36 p.m. OK GNU C++14 TESTS 84 155 524390400 2700
27284708 Stupid_cdd C May 22, 2017, 1:12 p.m. OK GNU C++14 TESTS 84 170 459980800 2700
25796760 SoSad C March 25, 2017, 11:50 a.m. OK GNU C++14 TESTS 84 171 254464000 2700
52932102 walht C April 18, 2019, 3:19 a.m. OK GNU C++14 TESTS 84 171 254771200 2700
35953720 HirasawaaYui C March 5, 2018, 1:03 a.m. OK GNU C++14 TESTS 84 171 258355200 2700
37908819 rushcheyo C May 5, 2018, 2:25 p.m. OK GNU C++17 TESTS 84 155 258150400 2700
35750363 iotang C Feb. 27, 2018, 3:25 a.m. OK GNU C++17 TESTS 84 155 325120000 2700
53942014 AlphaINF C May 10, 2019, 3:50 a.m. OK GNU C++17 TESTS 84 171 262963200 2700
39278633 zbtrs C June 16, 2018, 4:11 a.m. OK GNU C++17 TESTS 84 171 387788800 2700
57016557 hjk1030 C July 14, 2019, 11:54 a.m. OK GNU C++17 TESTS 84 186 259481600 2700
53941645 AlphaINF C May 10, 2019, 3:31 a.m. OK GNU C++17 TESTS 84 186 262963200 2700
50161317 vjudge4 C Feb. 19, 2019, 12:42 p.m. OK GNU C++17 TESTS 84 186 266547200 2700
46919211 vjudge1 C Dec. 12, 2018, 2:17 a.m. OK GNU C++17 TESTS 84 186 266547200 2700
46919202 nimphy C Dec. 12, 2018, 2:17 a.m. OK GNU C++17 TESTS 84 186 266547200 2700
60417558 naitir C Sept. 12, 2019, 3:27 a.m. OK GNU C++17 TESTS 84 187 260505600 2700
2416035 Bugman C Oct. 23, 2012, 6:32 a.m. OK Java 6 TESTS 84 1437 382873600 2700
2416030 Bugman C Oct. 23, 2012, 6:30 a.m. OK Java 6 TESTS 84 1437 382873600 2700
2415979 Bugman C Oct. 23, 2012, 6:15 a.m. OK Java 6 TESTS 84 1531 397926400 2700
2561436 uwi C Nov. 15, 2012, 4:48 a.m. OK Java 6 TESTS 84 2328 514457600 2700
2561452 uwi C Nov. 15, 2012, 4:59 a.m. OK Java 6 TESTS 84 2406 514457600 2700
2468455 good_mood C Oct. 29, 2012, 6:57 p.m. OK Java 6 TESTS 84 2968 522035200 2700
2403375 YuukaKazami C Oct. 21, 2012, 12:24 p.m. OK Java 6 TESTS 84 2968 522035200 2700
2415984 Bugman C Oct. 23, 2012, 6:17 a.m. OK Java 6 TESTS 84 3265 483635200 2700
2560035 uwi C Nov. 14, 2012, 4:48 p.m. OK Java 6 TESTS 84 4109 522649600 2700
2560093 uwi C Nov. 14, 2012, 5 p.m. OK Java 6 TESTS 84 4296 522240000 2700
15923032 Irkutsk_ISRU C Feb. 10, 2016, 1:15 a.m. OK Java 7 TESTS 84 1466 521216000 2700
5409558 uwi C Dec. 11, 2013, 1:25 p.m. OK Java 7 TESTS 84 1902 255590400 2700
4458098 PlayLikeNeverB4 C Sept. 14, 2013, 1:44 p.m. OK Java 7 TESTS 84 3088 521932800 2700
2828965 FattyPenguin C Dec. 26, 2012, 12:49 p.m. OK Java 7 TESTS 84 4593 530227200 2700
2828952 FattyPenguin C Dec. 26, 2012, 12:46 p.m. OK Java 7 TESTS 84 4609 523571200 2700
2828973 FattyPenguin C Dec. 26, 2012, 12:53 p.m. OK Java 7 TESTS 84 4968 530227200 2700
7104340 AlexFetisov C July 14, 2014, 11:47 p.m. OK Java 8 TESTS 84 1092 272281600 2700
7104326 AlexFetisov C July 14, 2014, 11:41 p.m. OK Java 8 TESTS 84 1216 255897600 2700
31811533 tomdmitriev C Oct. 27, 2017, 4:13 p.m. OK Java 8 TESTS 84 2059 389324800 2700
55332557 2017gdgzoi1539 C June 9, 2019, 11:52 a.m. OK MS C++ TESTS 84 186 260505600 2700
10831209 zhengly123 C April 23, 2015, 6:31 a.m. OK MS C++ TESTS 84 186 262553600 2700
35567964 vjudge2 C Feb. 22, 2018, 8:28 a.m. OK MS C++ TESTS 84 202 284876800 2700
3648195 916852 C April 28, 2013, 1:29 p.m. OK MS C++ TESTS 84 312 258560000 2700
7926593 lijianlong C Sept. 23, 2014, 12:33 p.m. OK MS C++ TESTS 84 312 260505600 2700
12799470 sister_what_hate_most C Sept. 1, 2015, 9:15 a.m. OK MS C++ TESTS 84 358 266547200 2700
59463832 vjudge3 C Aug. 25, 2019, 3:10 p.m. OK MS C++ TESTS 84 358 356454400 2700
7994253 jianlonglee C Sept. 28, 2014, 12:34 p.m. OK MS C++ TESTS 84 373 260505600 2700
7993968 jianlonglee C Sept. 28, 2014, 12:11 p.m. OK MS C++ TESTS 84 374 260505600 2700
4646326 alpc104 C Oct. 3, 2013, 4:05 a.m. OK MS C++ TESTS 84 374 267571200 2700

remove filters

Back to search problems