Codeforces Round 215 (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
367 Codeforces Round 215 (Div. 1) FINISHED False 7200 346343399 Nov. 26, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4332 ) A Sereja and Algorithm PROGRAMMING data structures implementation 1500

B'Sereja loves all sorts of algorithms. He has recently come up with a new algorithm, which receives a string as an input. Let 's represent the input string of the algorithm as q xe2 x80 x89= xe2 x80 x89q1q2... qk. The algorithm consists of two steps: Sereja thinks that the algorithm works correctly on string q if there is a non-zero probability that the algorithm will be terminated. But if the algorithm anyway will work for infinitely long on a string, then we consider the algorithm to work incorrectly on this string. Sereja wants to test his algorithm. For that, he has string s xe2 x80 x89= xe2 x80 x89s1s2... sn, consisting of n characters. The boy conducts a series of m tests. As the i-th test, he sends substring slisli xe2 x80 x89+ xe2 x80 x891... sri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) to the algorithm input. Unfortunately, the implementation of his algorithm works too long, so Sereja asked you to help. For each test (li, xe2 x80 x89ri) determine if the algorithm works correctly on this test or not. The first line contains non-empty string s, its length (n) doesn 't exceed 105. It is guaranteed that string s only contains characters: 'x ', 'y ', 'z '. The second line contains integer m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of tests. Next m lines contain the tests. The i-th line contains a pair of integers li, ri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). For each test, print "YES" (without the quotes) if the algorithm works correctly on the corresponding test and "NO" (without the quotes) otherwise. In the first example, in test one and two the algorithm will always be terminated in one step. In the fourth test you can get string "xzyx" on which the algorithm will terminate. In all other tests the algorithm doesn 't work correctly. '...

Tutorials

Codeforces Round #215 — tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5247373 Gassa A Nov. 26, 2013, 3:50 p.m. OK D TESTS 38 124 3072000 1500
5251353 Shaykhutdinov-T-I A Nov. 26, 2013, 4:27 p.m. OK Delphi TESTS 38 31 1536000 1500
5333494 Ramp A Dec. 2, 2013, 1:34 p.m. OK Delphi TESTS 38 31 2662400 1500
5245979 Frommi A Nov. 26, 2013, 3:41 p.m. OK Delphi TESTS 38 31 3891200 1500
5274353 Djez A Nov. 27, 2013, 4:14 p.m. OK Delphi TESTS 38 46 1228800 1500
5260593 FxF A Nov. 26, 2013, 6:41 p.m. OK Delphi TESTS 38 46 1433600 1500
5245989 Misha100896 A Nov. 26, 2013, 3:41 p.m. OK Delphi TESTS 38 46 1433600 1500
5286715 favstovol A Nov. 28, 2013, 1:21 p.m. OK Delphi TESTS 38 46 1536000 1500
5260115 ruban A Nov. 26, 2013, 6:21 p.m. OK Delphi TESTS 38 46 5120000 1500
5246983 equi A Nov. 26, 2013, 3:47 p.m. OK Delphi TESTS 38 62 12288000 1500
5258992 gamezovladislav A Nov. 26, 2013, 5:52 p.m. OK FPC TESTS 38 62 16486400 1500
5355366 Wolfik A Dec. 5, 2013, 3:43 p.m. OK FPC TESTS 38 78 1536000 1500
5259758 Yury_Bandarchuk A Nov. 26, 2013, 6:10 p.m. OK FPC TESTS 38 78 1536000 1500
5254004 yanush A Nov. 26, 2013, 4:56 p.m. OK FPC TESTS 38 78 1536000 1500
5248929 venus.le197 A Nov. 26, 2013, 4:03 p.m. OK FPC TESTS 38 78 1536000 1500
5261377 volverine A Nov. 26, 2013, 7:38 p.m. OK FPC TESTS 38 78 1638400 1500
5259537 Nik_Storm_2010 A Nov. 26, 2013, 6:05 p.m. OK FPC TESTS 38 78 1638400 1500
5259739 Astreb A Nov. 26, 2013, 6:10 p.m. OK FPC TESTS 38 78 1740800 1500
5253954 vietdoan A Nov. 26, 2013, 4:56 p.m. OK FPC TESTS 38 78 2457600 1500
5273433 thaison1496 A Nov. 27, 2013, 2:40 p.m. OK FPC TESTS 38 78 2867200 1500
5353555 pritam108 A Dec. 5, 2013, 11:41 a.m. OK GNU C TESTS 38 46 1228800 1500
11198423 ving.xia A May 22, 2015, 7:17 a.m. OK GNU C TESTS 38 46 1331200 1500
11198385 ving.xia A May 22, 2015, 7:13 a.m. OK GNU C TESTS 38 46 1331200 1500
5436906 NoSoul A Dec. 14, 2013, 5:21 a.m. OK GNU C TESTS 38 46 1331200 1500
5290604 FengShang A Nov. 29, 2013, 12:51 a.m. OK GNU C TESTS 38 46 1331200 1500
5285255 hikmet548 A Nov. 28, 2013, 9:16 a.m. OK GNU C TESTS 38 46 1331200 1500
5285253 hikmet548 A Nov. 28, 2013, 9:16 a.m. OK GNU C TESTS 38 46 1331200 1500
5250171 genius.zhaoyi A Nov. 26, 2013, 4:15 p.m. OK GNU C TESTS 38 46 1740800 1500
14208028 lucaspk33 A Nov. 12, 2015, 5:24 a.m. OK GNU C TESTS 38 61 1331200 1500
11198409 ving.xia A May 22, 2015, 7:16 a.m. OK GNU C TESTS 38 61 1331200 1500
13890828 unknown_shadow A Oct. 27, 2015, 1:09 p.m. OK GNU C++ TESTS 38 31 1126400 1500
7691010 zyh A Sept. 6, 2014, 1:26 a.m. OK GNU C++ TESTS 38 31 1228800 1500
6861764 dzy493941464 A June 11, 2014, 12:23 a.m. OK GNU C++ TESTS 38 31 1331200 1500
5272052 FancyCoder A Nov. 27, 2013, 12:30 p.m. OK GNU C++ TESTS 38 31 1331200 1500
5248652 bill125 A Nov. 26, 2013, 4 p.m. OK GNU C++ TESTS 38 31 1331200 1500
5247384 sokokaleb A Nov. 26, 2013, 3:50 p.m. OK GNU C++ TESTS 38 31 1331200 1500
5474973 Jhamra A Dec. 19, 2013, 12:20 p.m. OK GNU C++ TESTS 38 31 1433600 1500
5250705 c0d3junki3 A Nov. 26, 2013, 4:20 p.m. OK GNU C++ TESTS 38 31 1433600 1500
5354512 chipchip3412 A Dec. 5, 2013, 1:52 p.m. OK GNU C++ TESTS 38 31 1536000 1500
5254158 bcurcio A Nov. 26, 2013, 4:58 p.m. OK GNU C++ TESTS 38 31 1638400 1500
5268300 K_ON A Nov. 27, 2013, 5:27 a.m. OK GNU C++0x TESTS 38 31 1331200 1500
5251027 MinakoKojima A Nov. 26, 2013, 4:23 p.m. OK GNU C++0x TESTS 38 31 5222400 1500
5275826 ikicic A Nov. 27, 2013, 7:55 p.m. OK GNU C++0x TESTS 38 46 1228800 1500
5247182 fengzlzl A Nov. 26, 2013, 3:49 p.m. OK GNU C++0x TESTS 38 46 1228800 1500
5245006 gongbaoa A Nov. 26, 2013, 3:36 p.m. OK GNU C++0x TESTS 38 46 1228800 1500
9434737 swust_20131737 A Jan. 15, 2015, 9:12 a.m. OK GNU C++0x TESTS 38 46 1331200 1500
8031104 hogloid A Sept. 30, 2014, 12:35 a.m. OK GNU C++0x TESTS 38 46 1331200 1500
7345363 delta_4d A Aug. 4, 2014, 1:45 p.m. OK GNU C++0x TESTS 38 46 1331200 1500
5564433 enrevol A Dec. 29, 2013, 8:50 p.m. OK GNU C++0x TESTS 38 46 1331200 1500
5486307 kenimo A Dec. 21, 2013, 10:21 a.m. OK GNU C++0x TESTS 38 46 1331200 1500
31866536 TadijaSebez A Oct. 29, 2017, 12:32 p.m. OK GNU C++11 TESTS 38 46 1126400 1500
16735748 abcdeedcba A March 15, 2016, 11:24 p.m. OK GNU C++11 TESTS 38 46 1126400 1500
13230201 konbu A Sept. 26, 2015, 9:20 a.m. OK GNU C++11 TESTS 38 46 1126400 1500
10763441 besher A April 18, 2015, 4:15 a.m. OK GNU C++11 TESTS 38 46 1126400 1500
67997362 vjudge5 A Dec. 31, 2019, 8:55 a.m. OK GNU C++11 TESTS 38 46 1331200 1500
41647922 Ithea_Myse_Valgulious A Aug. 16, 2018, 9:49 a.m. OK GNU C++11 TESTS 38 46 1331200 1500
41647885 vjudge2 A Aug. 16, 2018, 9:48 a.m. OK GNU C++11 TESTS 38 46 1331200 1500
18879315 Fry_guest A July 4, 2016, 8:28 a.m. OK GNU C++11 TESTS 38 46 1331200 1500
13405127 Hasan0540 A Oct. 4, 2015, 4:16 p.m. OK GNU C++11 TESTS 38 46 1331200 1500
12536397 Guts A Aug. 14, 2015, 9:25 p.m. OK GNU C++11 TESTS 38 46 1331200 1500
29667117 mahmoud2407 A Aug. 21, 2017, 7:39 p.m. OK GNU C++14 TESTS 38 61 1228800 1500
23873654 spj_29 A Jan. 16, 2017, 5:20 a.m. OK GNU C++14 TESTS 38 61 3174400 1500
43549983 Ownography A Sept. 28, 2018, 10:28 p.m. OK GNU C++14 TESTS 38 62 1331200 1500
27327607 RNS3 A May 25, 2017, 1:12 a.m. OK GNU C++14 TESTS 38 62 1331200 1500
27327390 RNS_JKS A May 25, 2017, 12:25 a.m. OK GNU C++14 TESTS 38 62 1331200 1500
22379542 mengxiang000 A Nov. 21, 2016, 8:51 a.m. OK GNU C++14 TESTS 38 62 1331200 1500
22070003 after A Nov. 6, 2016, 7:33 a.m. OK GNU C++14 TESTS 38 62 1331200 1500
58889041 Theofratus A Aug. 16, 2019, 4:16 a.m. OK GNU C++14 TESTS 38 62 1433600 1500
31876927 Quinas A Oct. 29, 2017, 8:38 p.m. OK GNU C++14 TESTS 38 62 1536000 1500
31005182 teitoku A Oct. 5, 2017, 1:11 a.m. OK GNU C++14 TESTS 38 62 1740800 1500
54903288 KODS A June 1, 2019, 7:42 a.m. OK GNU C++17 TESTS 38 77 1536000 1500
37014056 IceQuarze A April 6, 2018, 6:30 a.m. OK GNU C++17 TESTS 38 77 6246400 1500
57873127 charity A July 28, 2019, 3:20 a.m. OK GNU C++17 TESTS 38 78 1331200 1500
58794566 vjudge1 A Aug. 14, 2019, 4:18 a.m. OK GNU C++17 TESTS 38 78 1433600 1500
54888547 maratha A May 31, 2019, 6:50 p.m. OK GNU C++17 TESTS 38 78 1433600 1500
54506027 hai201 A May 23, 2019, 3:54 a.m. OK GNU C++17 TESTS 38 78 1433600 1500
53084753 tomsyd A April 21, 2019, 8:25 a.m. OK GNU C++17 TESTS 38 78 1433600 1500
47011723 kra2re A Dec. 14, 2018, 4:53 p.m. OK GNU C++17 TESTS 38 78 1433600 1500
41203051 coder_h A Aug. 4, 2018, 6:28 a.m. OK GNU C++17 TESTS 38 78 1433600 1500
39543830 nvmdava A June 23, 2018, 2:31 p.m. OK GNU C++17 TESTS 38 78 1433600 1500
7924943 rizalgow A Sept. 23, 2014, 10:55 a.m. OK Go TESTS 38 233 2662400 1500
7991779 kaiysh A Sept. 28, 2014, 8:58 a.m. OK Go TESTS 38 295 2662400 1500
5320072 autotaker A Dec. 1, 2013, 8:36 a.m. OK Haskell TESTS 38 93 5632000 1500
5251929 uwi A Nov. 26, 2013, 4:33 p.m. OK Java 6 TESTS 38 93 204800 1500
5268622 GauravG A Nov. 27, 2013, 6:08 a.m. OK Java 6 TESTS 38 93 716800 1500
6600997 nickbuelich A May 12, 2014, 12:59 p.m. OK Java 6 TESTS 38 124 102400 1500
6600843 nickbuelich A May 12, 2014, 12:59 p.m. OK Java 6 TESTS 38 124 102400 1500
5273068 udontknowme A Nov. 27, 2013, 2:11 p.m. OK Java 6 TESTS 38 124 204800 1500
5706372 Sammarize A Jan. 16, 2014, 10:41 p.m. OK Java 6 TESTS 38 124 307200 1500
5250542 llaki A Nov. 26, 2013, 4:18 p.m. OK Java 6 TESTS 38 124 307200 1500
5249044 wackloner A Nov. 26, 2013, 4:04 p.m. OK Java 6 TESTS 38 124 307200 1500
5248602 amirrr A Nov. 26, 2013, 4 p.m. OK Java 6 TESTS 38 124 307200 1500
5248337 hiukim A Nov. 26, 2013, 3:57 p.m. OK Java 6 TESTS 38 124 307200 1500
5254019 lazzrov A Nov. 26, 2013, 4:56 p.m. OK Java 7 TESTS 38 78 102400 1500
5245133 Egor A Nov. 26, 2013, 3:37 p.m. OK Java 7 TESTS 38 93 0 1500
5635719 DoublePointer A Jan. 8, 2014, 3:42 a.m. OK Java 7 TESTS 38 109 0 1500
5260754 rohangarg A Nov. 26, 2013, 6:48 p.m. OK Java 7 TESTS 38 109 102400 1500
7929260 GhpS A Sept. 23, 2014, 4:55 p.m. OK Java 7 TESTS 38 124 0 1500
7510353 Ziklon A Aug. 19, 2014, 5 p.m. OK Java 7 TESTS 38 124 0 1500
5710269 _piyush A Jan. 17, 2014, 1 p.m. OK Java 7 TESTS 38 124 0 1500
5293150 Saguntoz A Nov. 29, 2013, 11:57 a.m. OK Java 7 TESTS 38 124 0 1500
5247925 Azat_Yusupov A Nov. 26, 2013, 3:54 p.m. OK Java 7 TESTS 38 124 0 1500
5247622 Soldat A Nov. 26, 2013, 3:52 p.m. OK Java 7 TESTS 38 124 0 1500
45319061 sameer_hack A Nov. 5, 2018, 9:37 a.m. OK Java 8 TESTS 38 139 0 1500
30355737 Maulik_Patel A Sept. 15, 2017, 2:38 a.m. OK Java 8 TESTS 38 155 0 1500
9336437 poikniok A Jan. 1, 2015, 2:54 a.m. OK Java 8 TESTS 38 156 0 1500
38965010 Golmol A June 5, 2018, 9:40 a.m. OK Java 8 TESTS 38 156 20480000 1500
53971949 Hoda_Hisham A May 10, 2019, 10:06 p.m. OK Java 8 TESTS 38 170 0 1500
59878849 Sleep A Sept. 2, 2019, 2:58 a.m. OK Java 8 TESTS 38 186 0 1500
16682051 Ahmad_Elsagheer A March 12, 2016, 9:17 p.m. OK Java 8 TESTS 38 186 0 1500
33229678 flyman3046 A Dec. 14, 2017, 4:44 a.m. OK Java 8 TESTS 38 186 20889600 1500
20349718 Corvus A Sept. 2, 2016, 11:03 p.m. OK Java 8 TESTS 38 187 0 1500
33899560 kocko A Jan. 4, 2018, 9:20 a.m. OK Java 8 TESTS 38 187 20684800 1500
12980591 og.kostya A Sept. 13, 2015, 6:26 a.m. OK MS C# TESTS 38 62 3993600 1500
5247556 Eugene A Nov. 26, 2013, 3:51 p.m. OK MS C# TESTS 38 62 4505600 1500
10157294 azukun A March 5, 2015, 7:38 a.m. OK MS C# TESTS 38 171 7270400 1500
5255316 fiver A Nov. 26, 2013, 5:11 p.m. OK MS C# TESTS 38 234 74649600 1500
5340598 lastseed A Dec. 3, 2013, 6:48 a.m. OK MS C++ TESTS 38 31 1126400 1500
5663609 RiKang A Jan. 12, 2014, 8:07 a.m. OK MS C++ TESTS 38 46 1126400 1500
5499942 Asteroid A Dec. 24, 2013, 3:26 a.m. OK MS C++ TESTS 38 46 1126400 1500
5485018 carber A Dec. 21, 2013, 5:11 a.m. OK MS C++ TESTS 38 46 1126400 1500
5288465 vjudge3 A Nov. 28, 2013, 4:56 p.m. OK MS C++ TESTS 38 46 1126400 1500
5261167 Ret A Nov. 26, 2013, 7:16 p.m. OK MS C++ TESTS 38 46 1126400 1500
5251148 GeKa A Nov. 26, 2013, 4:24 p.m. OK MS C++ TESTS 38 46 1126400 1500
5249612 Anarivu A Nov. 26, 2013, 4:09 p.m. OK MS C++ TESTS 38 46 1126400 1500
5249411 hackk A Nov. 26, 2013, 4:07 p.m. OK MS C++ TESTS 38 46 1126400 1500
5248925 cfy A Nov. 26, 2013, 4:03 p.m. OK MS C++ TESTS 38 46 1126400 1500
5346098 asdoc A Dec. 4, 2013, 7:17 a.m. OK Python 2 TESTS 38 483 8806400 1500
5246563 nwi A Nov. 26, 2013, 3:45 p.m. OK Python 2 TESTS 38 483 9932800 1500
5251238 Artoemius A Nov. 26, 2013, 4:25 p.m. OK Python 2 TESTS 38 514 6041600 1500
5291785 timeless A Nov. 29, 2013, 7:11 a.m. OK Python 2 TESTS 38 530 5017600 1500
5524493 Nekrolm A Dec. 26, 2013, 11:29 a.m. OK Python 2 TESTS 38 530 6553600 1500
7051534 vjudge3 A July 9, 2014, 7:43 a.m. OK Python 2 TESTS 38 545 5120000 1500
7679759 dow22pow22 A Sept. 4, 2014, 7:44 a.m. OK Python 2 TESTS 38 545 5939200 1500
14050089 Laybson A Nov. 4, 2015, 12:46 a.m. OK Python 2 TESTS 38 561 6758400 1500
5275073 Unlenin A Nov. 27, 2013, 5:31 p.m. OK Python 2 TESTS 38 561 10444800 1500
5314416 nealzane A Nov. 30, 2013, 3:45 p.m. OK Python 2 TESTS 38 577 4710400 1500
5285846 TsunamiNoLetGo A Nov. 28, 2013, 11:09 a.m. OK Python 3 TESTS 38 624 6451200 1500
16322955 orailly A Feb. 25, 2016, 8:33 a.m. OK Python 3 TESTS 38 638 8704000 1500
5310285 yugle7 A Nov. 30, 2013, 6:37 a.m. OK Python 3 TESTS 38 764 34201600 1500
56029119 Mohamed_Ayman A June 25, 2019, 8:33 a.m. OK Python 3 TESTS 38 811 10035200 1500
5310319 yugle7 A Nov. 30, 2013, 6:42 a.m. OK Python 3 TESTS 38 811 34201600 1500
5310377 yugle7 A Nov. 30, 2013, 6:48 a.m. OK Python 3 TESTS 38 858 34201600 1500
35582223 arbitrary_A A Feb. 22, 2018, 7:38 p.m. OK Python 3 TESTS 38 919 15462400 1500
35582204 arbitrary_A A Feb. 22, 2018, 7:37 p.m. OK Python 3 TESTS 38 920 15667200 1500
41984509 Mk_Python_v1 A Aug. 23, 2018, 5:04 a.m. OK Python 3 TESTS 38 966 33996800 1500
10519358 overrorflow A March 29, 2015, 7:02 p.m. OK Python 3 TESTS 38 997 10444800 1500
5247500 limed A Nov. 26, 2013, 3:51 p.m. OK Scala TESTS 38 764 204800 1500

remove filters

Back to search problems