Codeforces Round 148 (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
239 Codeforces Round 148 (Div. 2) FINISHED False 7200 385135163 Nov. 4, 2012, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1378 ) B Easy Tape Programming PROGRAMMING brute force implementation 1500

B'There is a programming language in which every program is a non-empty sequence of "<" and ">" signs and digits. Let 's explain how the interpreter of this programming language works. A program is interpreted using movement of instruction pointer (IP) which consists of two parts. Initially CP points to the leftmost character of the sequence and DP points to the right. We repeat the following steps until the first moment that CP points to somewhere outside the sequence. If at any moment the CP goes outside of the sequence the execution is terminated. It 's obvious the every program in this language terminates after some steps. We have a sequence s1, xe2 x80 x89s2, xe2 x80 x89..., xe2 x80 x89sn of "<", ">" and digits. You should answer q queries. Each query gives you l and r and asks how many of each digit will be printed if we run the sequence sl, xe2 x80 x89sl xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89sr as an independent program in this language. The first line of input contains two integers n and q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- represents the length of the sequence s and the number of queries. The second line contains s, a sequence of "<", ">" and digits (0..9) written from left to right. Note, that the characters of s are not separated with spaces. The next q lines each contains two integers li and 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) -- the i-th query. For each query print 10 space separated integers: x0, xe2 x80 x89x1, xe2 x80 x89..., xe2 x80 x89x9 where xi equals the number of times the interpreter prints i while running the corresponding program. Print answers to the queries in the order they are given in input.'...

Tutorials

Editorial for Codeforces Round #148

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3297840 AHTuTTuTyX B March 13, 2013, 9:58 a.m. OK Delphi TESTS 33 15 102400 1500
2510707 jokeD B Nov. 5, 2012, 12:08 p.m. OK Delphi TESTS 33 31 0 1500
2509372 wasyapetya B Nov. 5, 2012, 5:39 a.m. OK Delphi TESTS 33 31 0 1500
2510712 airon B Nov. 5, 2012, 12:09 p.m. OK Delphi TESTS 33 31 0 1500
2505386 Ramp B Nov. 4, 2012, 7:04 p.m. OK Delphi TESTS 33 31 0 1500
2504479 PAG B Nov. 4, 2012, 5:54 p.m. OK Delphi TESTS 33 31 0 1500
2502903 Misha100896 B Nov. 4, 2012, 5:17 p.m. OK Delphi TESTS 33 31 0 1500
2502391 Bolotin_Daniil B Nov. 4, 2012, 5:06 p.m. OK Delphi TESTS 33 31 0 1500
2501618 gohard B Nov. 4, 2012, 4:48 p.m. OK Delphi TESTS 33 31 0 1500
2501138 San4eS B Nov. 4, 2012, 4:38 p.m. OK Delphi TESTS 33 31 0 1500
3857432 vilcheuski B June 11, 2013, 12:40 p.m. OK FPC TESTS 33 15 204800 1500
3135772 Nik_Storm_2010 B Feb. 16, 2013, 8:28 a.m. OK FPC TESTS 33 15 204800 1500
2848774 Daniil B Dec. 28, 2012, 11:39 a.m. OK FPC TESTS 33 15 204800 1500
5419862 htkek B Dec. 13, 2013, 10:59 a.m. OK FPC TESTS 33 30 204800 1500
4951554 Astreb B Nov. 1, 2013, 2:04 p.m. OK FPC TESTS 33 30 204800 1500
4951504 Aist B Nov. 1, 2013, 1:57 p.m. OK FPC TESTS 33 30 204800 1500
2533538 mikun_95 B Nov. 11, 2012, 2 p.m. OK FPC TESTS 33 31 0 1500
2520849 goodniker B Nov. 7, 2012, 9:36 p.m. OK FPC TESTS 33 31 0 1500
2509300 gray_owl B Nov. 5, 2012, 5:16 a.m. OK FPC TESTS 33 31 0 1500
2503380 chaos0000 B Nov. 4, 2012, 5:28 p.m. OK FPC TESTS 33 31 0 1500
3040433 gxnncrx1993 B Jan. 31, 2013, 12:10 p.m. OK GNU C TESTS 33 15 102400 1500
4197013 vjudge2 B July 29, 2013, 3:50 a.m. OK GNU C TESTS 33 30 0 1500
2648190 cpy B Nov. 25, 2012, 5:14 p.m. OK GNU C TESTS 33 31 0 1500
2647966 cpy B Nov. 25, 2012, 5:09 p.m. OK GNU C TESTS 33 31 0 1500
2524910 pedja B Nov. 8, 2012, 10:33 p.m. OK GNU C TESTS 33 31 0 1500
2523253 Monick B Nov. 8, 2012, 4:24 p.m. OK GNU C TESTS 33 31 0 1500
2509396 NoSoul B Nov. 5, 2012, 5:53 a.m. OK GNU C TESTS 33 31 0 1500
2505292 Sandeep_Singh_Chhabada B Nov. 4, 2012, 6:55 p.m. OK GNU C TESTS 33 31 0 1500
2503874 ZeroPointer B Nov. 4, 2012, 5:41 p.m. OK GNU C TESTS 33 31 0 1500
2502984 Practice_Scott B Nov. 4, 2012, 5:19 p.m. OK GNU C TESTS 33 31 0 1500
4173824 vjudge4 B July 27, 2013, 6:22 a.m. OK GNU C++ TESTS 33 0 0 1500
2851641 vjudge4 B Dec. 29, 2012, 7:44 a.m. OK GNU C++ TESTS 33 0 0 1500
3788910 R_R_ B May 28, 2013, 6:20 p.m. OK GNU C++ TESTS 33 15 0 1500
4046888 LucasJA B July 10, 2013, 2:07 p.m. OK GNU C++ TESTS 33 15 0 1500
3972325 amnsinghl B June 28, 2013, 1:33 p.m. OK GNU C++ TESTS 33 15 0 1500
3908091 dreamoon_love_AA B June 17, 2013, 3:59 a.m. OK GNU C++ TESTS 33 15 0 1500
3687393 Wild_Hamster B May 6, 2013, 3:27 p.m. OK GNU C++ TESTS 33 15 0 1500
3599544 wrangle1005 B April 22, 2013, 1:47 a.m. OK GNU C++ TESTS 33 15 0 1500
3475111 KIDx B April 5, 2013, 12:49 a.m. OK GNU C++ TESTS 33 15 0 1500
3145849 takaramono B Feb. 19, 2013, 6:40 a.m. OK GNU C++ TESTS 33 15 0 1500
4137009 alex_world B July 22, 2013, 6:16 p.m. OK GNU C++0x TESTS 33 15 102400 1500
3147429 Doxer B Feb. 19, 2013, 3:02 p.m. OK GNU C++0x TESTS 33 15 102400 1500
9789892 Z_silence B Feb. 10, 2015, 2:14 p.m. OK GNU C++0x TESTS 33 30 0 1500
4231372 vjudge2 B Aug. 5, 2013, 5:33 a.m. OK GNU C++0x TESTS 33 30 0 1500
7580351 behzad.nouri B Aug. 26, 2014, 1:48 p.m. OK GNU C++0x TESTS 33 30 102400 1500
5461482 vjudge2 B Dec. 18, 2013, 2:56 p.m. OK GNU C++0x TESTS 33 30 102400 1500
4851760 Orfest B Oct. 23, 2013, 12:20 p.m. OK GNU C++0x TESTS 33 30 102400 1500
7194986 w0w B July 21, 2014, 12:59 p.m. OK GNU C++0x TESTS 33 30 307200 1500
2714644 Mistereo Misha-Plus B Dec. 7, 2012, 9:27 a.m. OK GNU C++0x TESTS 33 31 0 1500
2681464 Xerxes B Nov. 30, 2012, 4:40 p.m. OK GNU C++0x TESTS 33 31 0 1500
27900874 AWCXV B June 19, 2017, 9:22 a.m. OK GNU C++11 TESTS 33 30 0 1500
27900848 vjudge3 B June 19, 2017, 9:20 a.m. OK GNU C++11 TESTS 33 30 0 1500
27742927 Himon_PUST B June 12, 2017, 6:07 p.m. OK GNU C++11 TESTS 33 30 0 1500
22688346 mariamzekry B Dec. 4, 2016, 4:47 a.m. OK GNU C++11 TESTS 33 30 0 1500
22688321 mariamzekry B Dec. 4, 2016, 4:45 a.m. OK GNU C++11 TESTS 33 30 0 1500
22685510 yasminealmohandes B Dec. 3, 2016, 9:25 p.m. OK GNU C++11 TESTS 33 30 0 1500
19611054 osama.alb96 B Aug. 4, 2016, 7:34 a.m. OK GNU C++11 TESTS 33 30 0 1500
18591674 3_Problems_Everyday B June 19, 2016, 6 a.m. OK GNU C++11 TESTS 33 30 0 1500
16228330 OmarHashim B Feb. 20, 2016, 12:03 p.m. OK GNU C++11 TESTS 33 30 0 1500
15267838 Verstand B Jan. 9, 2016, 10:32 a.m. OK GNU C++11 TESTS 33 30 0 1500
30159348 Green_zh B Sept. 6, 2017, 4:14 p.m. OK GNU C++14 TESTS 33 30 0 1500
20418975 PedramAghazadeh B Sept. 6, 2016, 12:44 p.m. OK GNU C++14 TESTS 33 30 0 1500
38574822 alwerty B May 24, 2018, 2:04 a.m. OK GNU C++14 TESTS 33 30 102400 1500
32082862 artur.socha B Nov. 5, 2017, 7:53 p.m. OK GNU C++14 TESTS 33 30 102400 1500
30130315 marryjianjian B Sept. 6, 2017, 11:47 a.m. OK GNU C++14 TESTS 33 30 102400 1500
27742872 Crazy__Coder B June 12, 2017, 6:04 p.m. OK GNU C++14 TESTS 33 30 102400 1500
22672833 Genawy B Dec. 3, 2016, 9:08 a.m. OK GNU C++14 TESTS 33 30 102400 1500
27548223 Momentaiii B June 3, 2017, 3:54 p.m. OK GNU C++14 TESTS 33 30 204800 1500
23666934 Ali.Pi B Jan. 9, 2017, 4:28 p.m. OK GNU C++14 TESTS 33 30 1843200 1500
24253430 gaporf B Jan. 29, 2017, 6:03 p.m. OK GNU C++14 TESTS 33 30 1945600 1500
55538981 Quinas B June 13, 2019, 6:20 p.m. OK GNU C++17 TESTS 33 30 0 1500
56073866 Darshit_99 B June 26, 2019, 11:53 a.m. OK GNU C++17 TESTS 33 30 0 1500
52817776 walkher8 B April 16, 2019, 10:26 a.m. OK GNU C++17 TESTS 33 30 0 1500
46306236 Turysbek B Nov. 28, 2018, 10:36 a.m. OK GNU C++17 TESTS 33 30 102400 1500
38958924 AliMirlou B June 5, 2018, 4:04 a.m. OK GNU C++17 TESTS 33 30 3481600 1500
68201732 tnakao B Jan. 4, 2020, 4:10 p.m. OK GNU C++17 TESTS 33 60 0 1500
58411886 vjudge5 B Aug. 7, 2019, 2:11 a.m. OK GNU C++17 TESTS 33 60 0 1500
50723068 vjudge1 B March 3, 2019, 8:56 a.m. OK GNU C++17 TESTS 33 60 102400 1500
46298749 IIeJlMeHb B Nov. 28, 2018, 5:55 a.m. OK GNU C++17 TESTS 33 60 102400 1500
50633009 ruo B March 1, 2019, 10:13 a.m. OK GNU C++17 TESTS 33 60 2252800 1500
2542566 rst76 B Nov. 12, 2012, 7:09 a.m. OK Haskell TESTS 33 31 0 1500
2509974 cojna B Nov. 5, 2012, 8:46 a.m. OK Haskell TESTS 33 31 0 1500
2501555 alexyz B Nov. 4, 2012, 4:47 p.m. OK Java 6 TESTS 33 78 102400 1500
2509323 Azat_Yusupov B Nov. 5, 2012, 5:23 a.m. OK Java 6 TESTS 33 93 102400 1500
2584772 Kech B Nov. 18, 2012, 11:37 a.m. OK Java 6 TESTS 33 93 204800 1500
2503041 alokyadaviitd B Nov. 4, 2012, 5:21 p.m. OK Java 6 TESTS 33 93 204800 1500
2502200 hiram1991 B Nov. 4, 2012, 5:01 p.m. OK Java 6 TESTS 33 93 204800 1500
2502129 ravelo1991 B Nov. 4, 2012, 5 p.m. OK Java 6 TESTS 33 93 204800 1500
2501751 vojto B Nov. 4, 2012, 4:51 p.m. OK Java 6 TESTS 33 93 204800 1500
2501720 dusty.and.rusty B Nov. 4, 2012, 4:50 p.m. OK Java 6 TESTS 33 93 204800 1500
2509209 coderbd B Nov. 5, 2012, 4:39 a.m. OK Java 6 TESTS 33 93 307200 1500
3412230 xiaowuc1 B March 27, 2013, 2:01 p.m. OK Java 6 TESTS 33 109 204800 1500
3227068 MohamedAmin B March 1, 2013, 7:36 p.m. OK Java 7 TESTS 33 78 0 1500
3226672 Mostafa.Gabriel B March 1, 2013, 6:02 p.m. OK Java 7 TESTS 33 78 0 1500
2500669 HAPKOMAH B Nov. 4, 2012, 4:29 p.m. OK Java 7 TESTS 33 78 102400 1500
2512418 bittib B Nov. 5, 2012, 6:32 p.m. OK Java 7 TESTS 33 93 0 1500
2510808 Quick_Coder B Nov. 5, 2012, 12:29 p.m. OK Java 7 TESTS 33 93 0 1500
2501134 spongebob B Nov. 4, 2012, 4:38 p.m. OK Java 7 TESTS 33 93 0 1500
2906159 ocelopilli B Jan. 11, 2013, 8:56 p.m. OK Java 7 TESTS 33 109 0 1500
2532251 jiangzhijie B Nov. 11, 2012, 7:15 a.m. OK Java 7 TESTS 33 109 0 1500
2508229 bogdan.sumy.ua B Nov. 4, 2012, 8:16 p.m. OK Java 7 TESTS 33 109 0 1500
2502321 trunghieu11 B Nov. 4, 2012, 5:04 p.m. OK Java 7 TESTS 33 109 0 1500
19616410 Corvus B Aug. 4, 2016, 1:49 p.m. OK Java 8 TESTS 33 218 0 1500
49809775 Shaykhutdinov-T-I B Feb. 11, 2019, 11:04 p.m. OK Java 8 TESTS 33 248 0 1500
11312535 poikniok B May 27, 2015, 4:16 a.m. OK Java 8 TESTS 33 248 0 1500
31691241 coderbond007 B Oct. 24, 2017, 5:44 p.m. OK Java 8 TESTS 33 248 20480000 1500
25456231 Slamur B March 13, 2017, 2:38 p.m. OK Java 8 TESTS 33 248 20889600 1500
33799427 raudelravelo91 B Dec. 30, 2017, 2:54 a.m. OK Java 8 TESTS 33 278 20684800 1500
29712339 Shavkat_Aminov B Aug. 23, 2017, 4:10 p.m. OK Java 8 TESTS 33 280 0 1500
10154639 OmarSaleh B March 4, 2015, 10:46 p.m. OK Java 8 TESTS 33 280 0 1500
35896662 Omar.Handouk B March 3, 2018, 5:25 p.m. OK Java 8 TESTS 33 280 20684800 1500
44725602 Anonymous B Oct. 23, 2018, 7:56 a.m. OK Java 8 TESTS 33 310 0 1500
7302175 Eeyore B July 31, 2014, 7:45 p.m. OK JavaScript TESTS 33 92 716800 1500
45989668 osip.fatkullin B Nov. 20, 2018, 8:57 a.m. OK Kotlin TESTS 33 372 1331200 1500
2502943 Guliash B Nov. 4, 2012, 5:18 p.m. OK Mono C# TESTS 33 109 102400 1500
2502824 jthread B Nov. 4, 2012, 5:16 p.m. OK Mono C# TESTS 33 109 1331200 1500
56856165 og.kostya B July 11, 2019, 6:32 p.m. OK Mono C# TESTS 33 124 3788800 1500
2503716 ManojMahadik B Nov. 4, 2012, 5:37 p.m. OK Mono C# TESTS 33 140 3174400 1500
2851688 vjudge4 B Dec. 29, 2012, 7:56 a.m. OK MS C++ TESTS 33 15 0 1500
2956031 Silent_coder B Jan. 18, 2013, 11:06 a.m. OK MS C++ TESTS 33 15 0 1500
2772849 Carups B Dec. 16, 2012, 12:10 p.m. OK MS C++ TESTS 33 15 0 1500
2885537 KIDx B Jan. 8, 2013, 3:13 p.m. OK MS C++ TESTS 33 15 0 1500
3019760 Svyat B Jan. 28, 2013, 1:30 p.m. OK MS C++ TESTS 33 15 0 1500
3257643 cchuncoder B March 6, 2013, 7:52 a.m. OK MS C++ TESTS 33 15 0 1500
3583748 JonsonBen B April 21, 2013, 7:01 a.m. OK MS C++ TESTS 33 15 0 1500
3365808 NALP B March 21, 2013, 2:34 p.m. OK MS C++ TESTS 33 15 102400 1500
19561540 Salim_Shebli B Aug. 1, 2016, 1:24 p.m. OK MS C++ TESTS 33 30 0 1500
11392135 cenariusxz B June 2, 2015, 3:22 p.m. OK MS C++ TESTS 33 30 0 1500
2508940 nealzane B Nov. 5, 2012, 2:52 a.m. OK Python 2 TESTS 33 62 0 1500
2974874 m1_k3 B Jan. 20, 2013, 7:49 p.m. OK Python 2 TESTS 33 62 0 1500
2575964 afedosov B Nov. 16, 2012, 10:07 p.m. OK Python 2 TESTS 33 62 0 1500
2508055 komarserjio B Nov. 4, 2012, 7:38 p.m. OK Python 2 TESTS 33 62 0 1500
2501544 ray040123 B Nov. 4, 2012, 4:46 p.m. OK Python 2 TESTS 33 62 0 1500
3897348 Neil B June 14, 2013, 8:46 p.m. OK Python 2 TESTS 33 62 102400 1500
2853657 dr.ikros B Dec. 29, 2012, 1:15 p.m. OK Python 2 TESTS 33 78 0 1500
2789906 daidailanlan B Dec. 18, 2012, 7:30 a.m. OK Python 2 TESTS 33 78 0 1500
2529767 mjf B Nov. 10, 2012, 10:13 a.m. OK Python 2 TESTS 33 78 0 1500
2519695 bor.is B Nov. 7, 2012, 2:16 p.m. OK Python 2 TESTS 33 78 0 1500
54437876 Mohamed_Ayman B May 21, 2019, 6:56 a.m. OK Python 3 TESTS 33 218 0 1500
54567892 ken B May 24, 2019, 5:31 p.m. OK Python 3 TESTS 33 218 307200 1500
2519694 Kharybin B Nov. 7, 2012, 2:15 p.m. OK Scala TESTS 33 359 1126400 1500
2529389 luyi0619 B Nov. 10, 2012, 7:18 a.m. OK Scala TESTS 33 375 102400 1500
2508275 lizan B Nov. 4, 2012, 8:26 p.m. OK Scala TESTS 33 375 204800 1500

remove filters

Back to search problems