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

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 249 ) D Tape Programming PROGRAMMING data structures implementation 2700

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 x89105) -- 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
42139215 Scut82 D Aug. 27, 2018, 3:26 a.m. OK GNU C++ TESTS 31 124 145715200 2700
40990560 ReaLNero1 D July 31, 2018, 12:02 a.m. OK GNU C++ TESTS 31 155 220057600 2700
25838472 Stalin. D March 27, 2017, 12:49 p.m. OK GNU C++ TESTS 31 155 222208000 2700
24700149 Jin_Haonan D Feb. 15, 2017, 3:59 p.m. OK GNU C++ TESTS 31 155 222208000 2700
12112923 vjudge4 D July 19, 2015, 5:34 a.m. OK GNU C++ TESTS 31 202 9318400 2700
28906939 owen_creeper D July 26, 2017, 2:07 p.m. OK GNU C++ TESTS 31 202 103321600 2700
15142819 HappyNewYearMike D Dec. 31, 2015, 10:47 p.m. OK GNU C++ TESTS 31 218 8806400 2700
21843116 SoiMae D Oct. 28, 2016, 9:41 a.m. OK GNU C++ TESTS 31 218 9011200 2700
14121473 130705009 D Nov. 7, 2015, 10:07 a.m. OK GNU C++ TESTS 31 218 10137600 2700
9484230 alpq654321 D Jan. 20, 2015, 12:08 p.m. OK GNU C++ TESTS 31 218 10137600 2700
9481965 neetenin D Jan. 20, 2015, 6:32 a.m. OK GNU C++0x TESTS 31 265 93593600 2700
2508080 MinakoKojima D Nov. 4, 2012, 7:41 p.m. OK GNU C++0x TESTS 31 359 12390400 2700
2508021 MinakoKojima D Nov. 4, 2012, 7:32 p.m. OK GNU C++0x TESTS 31 359 14131200 2700
2506618 MinakoKojima D Nov. 4, 2012, 7:06 p.m. OK GNU C++0x TESTS 31 375 14336000 2700
2533632 BSBandme D Nov. 11, 2012, 2:41 p.m. OK GNU C++0x TESTS 31 453 66457600 2700
9342921 zshi D Jan. 2, 2015, 2:03 a.m. OK GNU C++0x TESTS 31 528 79564800 2700
9229192 equation314 D Dec. 23, 2014, 1:29 a.m. OK GNU C++0x TESTS 31 652 181555200 2700
45787374 negiizhao D Nov. 16, 2018, 3:25 a.m. OK GNU C++11 TESTS 31 61 16998400 2700
45787407 Dust1404 D Nov. 16, 2018, 3:27 a.m. OK GNU C++11 TESTS 31 78 43827200 2700
55005409 SoiMae D June 3, 2019, 7:14 a.m. OK GNU C++11 TESTS 31 78 158003200 2700
63908934 pufanyi D Oct. 31, 2019, 7:32 a.m. OK GNU C++11 TESTS 31 93 51200000 2700
63907689 pufanyi D Oct. 31, 2019, 7:08 a.m. OK GNU C++11 TESTS 31 109 50892800 2700
59946525 dyxg D Sept. 3, 2019, 1:10 p.m. OK GNU C++11 TESTS 31 109 81510400 2700
64655092 yugao D Nov. 10, 2019, 7:01 p.m. OK GNU C++11 TESTS 31 124 46899200 2700
63908353 pufanyi D Oct. 31, 2019, 7:20 a.m. OK GNU C++11 TESTS 31 124 51200000 2700
45786060 Dust1404 D Nov. 16, 2018, 1:46 a.m. OK GNU C++11 TESTS 31 187 41676800 2700
53386182 Shine_Sky D April 27, 2019, 3:42 a.m. OK GNU C++11 TESTS 31 187 42291200 2700
31669499 black_caster D Oct. 24, 2017, 5:18 a.m. OK GNU C++14 TESTS 31 171 12595200 2700
31669399 black_caster D Oct. 24, 2017, 5:12 a.m. OK GNU C++14 TESTS 31 171 12595200 2700
31922199 Xin-Jie D Oct. 31, 2017, 1:10 p.m. OK GNU C++14 TESTS 31 202 9728000 2700
31680961 black_caster D Oct. 24, 2017, 12:25 p.m. OK GNU C++14 TESTS 31 202 11571200 2700
36749465 lxlxl D March 30, 2018, 2:19 p.m. OK GNU C++14 TESTS 31 202 76800000 2700
45997537 luogu_bot1 D Nov. 20, 2018, 1:02 p.m. OK GNU C++14 TESTS 31 202 207155200 2700
33673513 Marco_L_T D Dec. 27, 2017, 4:21 p.m. OK GNU C++14 TESTS 31 218 53964800 2700
36737025 Krydom_Yuudachi D March 30, 2018, 3:48 a.m. OK GNU C++14 TESTS 31 218 164966400 2700
52774350 Dreamless_Dreams D April 15, 2019, 11:12 a.m. OK GNU C++14 TESTS 31 233 86732800 2700
23666956 Ali.Pi D Jan. 9, 2017, 4:29 p.m. OK GNU C++14 TESTS 31 249 115097600 2700
52880611 CMXRYNP D April 16, 2019, 11:38 p.m. OK GNU C++17 TESTS 31 109 79360000 2700
66181048 hjk1030 D Dec. 2, 2019, 12:50 p.m. OK GNU C++17 TESTS 31 202 11161600 2700
38956271 alidadar7676 D June 4, 2018, 11:31 p.m. OK GNU C++17 TESTS 31 233 164659200 2700
52767163 Romeolong D April 15, 2019, 5:11 a.m. OK GNU C++17 TESTS 31 233 171315200 2700
54522052 misztsu D May 23, 2019, 12:43 p.m. OK GNU C++17 TESTS 31 234 30720000 2700
50623597 ruo D March 1, 2019, 4:10 a.m. OK GNU C++17 TESTS 31 280 220160000 2700
66180933 hjk1030 D Dec. 2, 2019, 12:48 p.m. OK GNU C++17 TESTS 31 1653 11161600 2700
8473197 PlayLikeNeverB4 D Oct. 29, 2014, 7:20 p.m. OK Java 7 TESTS 31 1248 166604800 2700
2748585 Erop D Dec. 10, 2012, 5:57 p.m. OK MS C++ TESTS 31 453 82329600 2700
2748655 Olja D Dec. 10, 2012, 6:18 p.m. OK MS C++ TESTS 31 484 17100800 2700
2511524 Endagorion D Nov. 5, 2012, 2:52 p.m. OK MS C++ TESTS 31 562 13312000 2700
2552300 DmitriyH D Nov. 13, 2012, 10:55 a.m. OK MS C++ TESTS 31 1781 164659200 2700

remove filters

Back to search problems