Codeforces Round 106 (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
149 Codeforces Round 106 (Div. 2) FINISHED False 7200 402937199 Feb. 10, 2012, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3890 ) D Coloring Brackets PROGRAMMING dp 2200

B'Once Petya read a problem about a bracket sequence. He gave it much thought but didn 't find a solution. Today you will face it. You are given string s. It represents a correct bracket sequence. A correct bracket sequence is the sequence of opening ("(") and closing (")") brackets, such that it is possible to obtain a correct mathematical expression from it, inserting numbers and operators between the brackets. For example, such sequences as "(())()" and "()" are correct bracket sequences and such sequences as ")()" and "(()" are not. In a correct bracket sequence each bracket corresponds to the matching bracket (an opening bracket corresponds to the matching closing bracket and vice versa). For example, in a bracket sequence shown of the figure below, the third bracket corresponds to the matching sixth one and the fifth bracket corresponds to the fourth one. You are allowed to color some brackets in the bracket sequence so as all three conditions are fulfilled: Find the number of different ways to color the bracket sequence. The ways should meet the above-given conditions. Two ways of coloring are considered different if they differ in the color of at least one bracket. As the result can be quite large, print it modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains the single string s (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|s| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89700) which represents a correct bracket sequence. Print the only number -- the number of ways to color the bracket sequence that meet the above given conditions modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). Let 's consider the first sample test. The bracket sequence from the sample can be colored, for example, as is shown on two figures below. The two ways of coloring shown below are incorrect. '...

Tutorials

Editorial Round #106

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2384389 AleksanderBalobanov D Oct. 18, 2012, 3 p.m. OK Delphi TESTS 38 46 35430400 2200
1900472 Alex_2oo8 D July 15, 2012, 11:34 a.m. OK FPC TESTS 38 30 1536000 2200
1800612 zdf615328619 D June 13, 2012, 1:20 p.m. OK FPC TESTS 38 30 19456000 2200
1904890 RazeN D July 16, 2012, 6:07 p.m. OK FPC TESTS 38 50 19456000 2200
13661981 bighead1234 D Oct. 16, 2015, 9:42 a.m. OK FPC TESTS 38 62 23142400 2200
12547167 vjudge4 D Aug. 15, 2015, 12:08 p.m. OK FPC TESTS 38 62 35737600 2200
5476194 llaugusty D Dec. 19, 2013, 3:42 p.m. OK FPC TESTS 38 92 144281600 2200
13666796 OriginalM D Oct. 16, 2015, 2:44 p.m. OK FPC TESTS 38 154 225792000 2200
13661305 ligerre D Oct. 16, 2015, 8:59 a.m. OK FPC TESTS 38 342 35635200 2200
6601493 houyideng D May 12, 2014, 5:02 a.m. OK GNU C TESTS 38 62 46182400 2200
6601455 houyideng D May 12, 2014, 4:51 a.m. OK GNU C TESTS 38 154 46182400 2200
4083840 jschneider2013 D July 17, 2013, 4:38 a.m. OK GNU C++ TESTS 38 15 102400 2200
3041206 Lord_F D Jan. 31, 2013, 3:07 p.m. OK GNU C++ TESTS 38 15 102400 2200
2104527 wyl8899 D Sept. 8, 2012, 3:21 p.m. OK GNU C++ TESTS 38 15 819200 2200
4004256 vjudge4 D July 2, 2013, 5:53 p.m. OK GNU C++ TESTS 38 15 76902400 2200
15229929 AmirAz D Jan. 7, 2016, 8:33 p.m. OK GNU C++ TESTS 38 30 0 2200
30942475 lico9712 D Oct. 2, 2017, 12:34 p.m. OK GNU C++ TESTS 38 30 102400 2200
30942399 vjudge1 D Oct. 2, 2017, 12:32 p.m. OK GNU C++ TESTS 38 30 102400 2200
19412853 ElBatanony D July 26, 2016, 2:04 a.m. OK GNU C++ TESTS 38 30 102400 2200
13853310 vjudge1 D Oct. 25, 2015, 12:09 p.m. OK GNU C++ TESTS 38 30 102400 2200
12126555 vjudge4 D July 20, 2015, 7:45 a.m. OK GNU C++ TESTS 38 30 102400 2200
3877309 nebulae D June 13, 2013, 3 a.m. OK GNU C++0x TESTS 38 15 36454400 2200
5213520 irwan_ap D Nov. 24, 2013, 3:09 p.m. OK GNU C++0x TESTS 38 30 15769600 2200
6445915 wanbo D April 22, 2014, 1:52 p.m. OK GNU C++0x TESTS 38 30 18227200 2200
4901701 mruxim D Oct. 26, 2013, 11:01 a.m. OK GNU C++0x TESTS 38 30 20275200 2200
9190161 aliasadiiii D Dec. 18, 2014, 5:42 p.m. OK GNU C++0x TESTS 38 30 35942400 2200
9814268 strawbreey D Feb. 13, 2015, 8:14 a.m. OK GNU C++0x TESTS 38 62 18227200 2200
8149643 rendon D Oct. 9, 2014, 4:36 a.m. OK GNU C++0x TESTS 38 62 36352000 2200
10158833 harshil D March 5, 2015, 10:08 a.m. OK GNU C++0x TESTS 38 62 36556800 2200
8230503 xtrome D Oct. 14, 2014, 5:59 p.m. OK GNU C++0x TESTS 38 92 6041600 2200
7691613 walk_upon D Sept. 6, 2014, 4:45 a.m. OK GNU C++0x TESTS 38 92 43622400 2200
60188569 rainboy D Sept. 6, 2019, 7:50 p.m. OK GNU C11 TESTS 38 62 0 2200
39206096 onlooker D June 13, 2018, 4:36 a.m. OK GNU C++11 TESTS 38 30 0 2200
39194109 vjudge3 D June 12, 2018, 2:21 p.m. OK GNU C++11 TESTS 38 30 0 2200
13656462 chaos0000 D Oct. 16, 2015, 2:55 a.m. OK GNU C++11 TESTS 38 30 102400 2200
11371880 maxkvant D May 31, 2015, 10:16 p.m. OK GNU C++11 TESTS 38 30 102400 2200
13946042 Goo_ D Oct. 30, 2015, 3:09 a.m. OK GNU C++11 TESTS 38 30 102400 2200
20740994 mohamedeltair D Sept. 18, 2016, 5:50 p.m. OK GNU C++11 TESTS 38 30 102400 2200
16528992 fengsuiyan D March 5, 2016, 8:05 a.m. OK GNU C++11 TESTS 38 30 102400 2200
30486925 nowhere132 D Sept. 19, 2017, 2:39 a.m. OK GNU C++11 TESTS 38 30 204800 2200
12258596 vjudge3 D July 29, 2015, 3:17 a.m. OK GNU C++11 TESTS 38 30 204800 2200
34658757 Brough D Jan. 29, 2018, 11:11 a.m. OK GNU C++11 TESTS 38 30 2150400 2200
29620433 cr0n D Aug. 20, 2017, 12:10 p.m. OK GNU C++14 TESTS 38 30 102400 2200
30939815 vjudge3 D Oct. 2, 2017, 10:33 a.m. OK GNU C++14 TESTS 38 30 204800 2200
34634342 ImaniAm D Jan. 28, 2018, 1:43 p.m. OK GNU C++14 TESTS 38 30 1945600 2200
29339207 yusal1234 D Aug. 10, 2017, 10:05 p.m. OK GNU C++14 TESTS 38 30 1945600 2200
28815275 Powerslave D July 24, 2017, 5:46 a.m. OK GNU C++14 TESTS 38 30 1945600 2200
29195829 _LowestJN D Aug. 4, 2017, 2:04 p.m. OK GNU C++14 TESTS 38 30 2048000 2200
25492304 unused D March 15, 2017, 7:47 a.m. OK GNU C++14 TESTS 38 30 2150400 2200
35974016 step_by_step D March 5, 2018, 6:03 p.m. OK GNU C++14 TESTS 38 30 2355200 2200
27961144 Shuvro77 D June 22, 2017, 9:05 a.m. OK GNU C++14 TESTS 38 30 2457600 2200
36800952 abdulla.ashraf D April 1, 2018, 2:21 p.m. OK GNU C++14 TESTS 38 30 5529600 2200
39187523 vjudge5 D June 12, 2018, 10:04 a.m. OK GNU C++17 TESTS 38 30 204800 2200
50592542 deadRabbit D Feb. 28, 2019, 8:17 a.m. OK GNU C++17 TESTS 38 30 307200 2200
39181686 OMG_wc D June 12, 2018, 6 a.m. OK GNU C++17 TESTS 38 30 35942400 2200
57620044 vjudge2 D July 24, 2019, 4:02 a.m. OK GNU C++17 TESTS 38 30 36044800 2200
45130704 vjudge3 D Oct. 31, 2018, 10:12 a.m. OK GNU C++17 TESTS 38 30 36659200 2200
35617738 FangHao D Feb. 24, 2018, 7:55 a.m. OK GNU C++17 TESTS 38 30 37785600 2200
51315769 ivan100sic D March 14, 2019, 11:55 p.m. OK GNU C++17 TESTS 38 60 614400 2200
69832729 cheek_i_breek D Jan. 30, 2020, 11:01 a.m. OK GNU C++17 TESTS 38 60 1228800 2200
53795347 DystoriaX D May 5, 2019, 3 p.m. OK GNU C++17 TESTS 38 60 17715200 2200
52329278 Lee2004 D April 5, 2019, 3:57 a.m. OK GNU C++17 TESTS 38 60 35840000 2200
4125878 fnozoszzt D July 21, 2013, 3:43 a.m. OK Java 6 TESTS 38 93 0 2200
4645387 llaki D Oct. 2, 2013, 10:36 p.m. OK Java 6 TESTS 38 936 157696000 2200
13255537 xiaowuc1 D Sept. 27, 2015, 9:27 p.m. OK Java 7 TESTS 38 280 15667200 2200
3659061 vjudge1 D May 2, 2013, 5:07 a.m. OK Java 7 TESTS 38 750 157696000 2200
14998881 DukeOfYork D Dec. 25, 2015, 7:16 a.m. OK Java 7 TESTS 38 778 65433600 2200
8842221 I_love_Malika D Nov. 25, 2014, 5:01 a.m. OK Java 7 TESTS 38 904 154112000 2200
8838483 I_love_Malika D Nov. 24, 2014, 4:48 p.m. OK Java 7 TESTS 38 1028 154521600 2200
60188570 Dukkha D Sept. 6, 2019, 7:50 p.m. OK Java 8 TESTS 38 248 0 2200
29580425 rtoni D Aug. 18, 2017, 5:07 p.m. OK Java 8 TESTS 38 248 0 2200
27181601 pitfall D May 17, 2017, 2:20 p.m. OK Java 8 TESTS 38 248 17408000 2200
18069355 Yury_Bandarchuk D May 25, 2016, 10:38 a.m. OK Java 8 TESTS 38 278 39833600 2200
23476811 MedoN11 D Jan. 1, 2017, 12:23 a.m. OK Java 8 TESTS 38 278 60825600 2200
23476827 MedoN11 D Jan. 1, 2017, 12:26 a.m. OK Java 8 TESTS 38 280 39628800 2200
26709378 MazzForces D April 27, 2017, 8:32 p.m. OK Java 8 TESTS 38 280 60928000 2200
14843765 alibaba D Dec. 17, 2015, 9:19 a.m. OK Java 8 TESTS 38 434 132505600 2200
28815742 vjudge4 D July 24, 2017, 6:08 a.m. OK Java 8 TESTS 38 498 101478400 2200
10623767 A.Elahi D April 7, 2015, 5:27 p.m. OK Java 8 TESTS 38 810 134041600 2200
5360128 Sloe D Dec. 6, 2013, 12:01 p.m. OK MS C++ TESTS 38 30 0 2200
20034932 Salim_Shebli D Aug. 21, 2016, 9:13 p.m. OK MS C++ TESTS 38 30 2662400 2200
15571241 ngdyqahty D Jan. 25, 2016, 10:28 a.m. OK MS C++ TESTS 38 30 15974400 2200
33721837 Tampere D Dec. 28, 2017, 2:30 p.m. OK MS C++ TESTS 38 30 20275200 2200
4222373 vjudge3 D Aug. 3, 2013, 5:51 p.m. OK MS C++ TESTS 38 30 35225600 2200
4207012 vjudge4 D July 31, 2013, 3:53 a.m. OK MS C++ TESTS 38 30 36352000 2200
35594754 vjudge2 D Feb. 23, 2018, 11:24 a.m. OK MS C++ TESTS 38 30 39731200 2200
4328654 Silent_coder D Aug. 23, 2013, 10:58 a.m. OK MS C++ TESTS 38 30 126771200 2200
2309968 vjudge2 D Oct. 7, 2012, 6:51 a.m. OK MS C++ TESTS 38 46 18227200 2200
2309972 woaishizhan D Oct. 7, 2012, 6:52 a.m. OK MS C++ TESTS 38 46 18227200 2200
52683516 2465806616 D April 13, 2019, 1:44 p.m. OK MS C++ 2017 TESTS 38 62 36352000 2200
54244367 ChaLemon D May 16, 2019, 2:16 p.m. OK MS C++ 2017 TESTS 38 92 35840000 2200
60902775 pajenegod D Sept. 19, 2019, 11:35 p.m. OK PyPy 2 TESTS 38 310 1945600 2200
52087782 vjudge3 D March 31, 2019, 2:16 p.m. OK PyPy 2 TESTS 38 342 5939200 2200
3578837 nealzane D April 20, 2013, 6:09 a.m. OK Python 2 TESTS 38 62 614400 2200
35839971 _____k_____ D March 2, 2018, 2:09 p.m. OK Python 2 TESTS 38 124 5017600 2200
35840301 ______n______ D March 2, 2018, 2:15 p.m. OK Python 2 TESTS 38 124 5017600 2200
35839969 _____i_____ D March 2, 2018, 2:09 p.m. OK Python 2 TESTS 38 124 5017600 2200
35834934 ______h______ D March 2, 2018, 12:16 p.m. OK Python 2 TESTS 38 124 5017600 2200
35834908 ______k______ D March 2, 2018, 12:16 p.m. OK Python 2 TESTS 38 124 5017600 2200
35834731 ______i______ D March 2, 2018, 12:10 p.m. OK Python 2 TESTS 38 124 5017600 2200
35831165 ______M______ D March 2, 2018, 9:38 a.m. OK Python 2 TESTS 38 124 5017600 2200
35840299 ______u______ D March 2, 2018, 2:15 p.m. OK Python 2 TESTS 38 124 5017600 2200
26230092 Peral D April 9, 2017, 4:37 a.m. OK Python 2 TESTS 38 124 5120000 2200

remove filters

Back to search problems