Codeforces Round 404 (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
785 Codeforces Round 404 (Div. 2) FINISHED False 7800 247589663 March 15, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3046 ) D Anton and School - 2 PROGRAMMING combinatorics dp math number theory 2200

B'As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketology lessons students usually learn different sequences that consist of round brackets (characters "(" and ")" (without quotes)). On the last lesson Anton learned about the regular simple bracket sequences (RSBS). A bracket sequence s of length n is an RSBS if the following conditions are met: For example, the sequence "((()))" is an RSBS but the sequences "((())" and "(()())" are not RSBS. Elena Ivanovna, Anton 's teacher, gave him the following task as a homework. Given a bracket sequence s. Find the number of its distinct subsequences such that they are RSBS. Note that a subsequence of s is a string that can be obtained from s by deleting some of its elements. Two subsequences are considered distinct if distinct sets of positions are deleted. Because the answer can be very big and Anton 's teacher doesn 't like big numbers, she asks Anton to find the answer modulo 109 xe2 x80 x89+ xe2 x80 x897. Anton thought of this task for a very long time, but he still doesn 't know how to solve it. Help Anton to solve this task and write a program that finds the answer for it! The only line of the input contains a string s -- the bracket sequence given in Anton 's homework. The string consists only of characters "(" and ")" (without quotes). It 's guaranteed that the string is not empty and its length doesn 't exceed 200 xe2 x80 x89000. Output one number -- the answer for the task modulo 109 xe2 x80 x89+ xe2 x80 x897. In the first sample the following subsequences are possible: The rest of the subsequnces are not RSBS. So we got 6 distinct subsequences that are RSBS, so the answer is 6. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
32195768 KagamiharaNadeshiko D Nov. 10, 2017, 1:02 p.m. OK FPC TESTS 60 327 6144000 2200
32355184 AsahiKasugano D Nov. 16, 2017, 12:42 p.m. OK FPC TESTS 60 343 6144000 2200
25702089 Lo_R_D D March 22, 2017, 1:19 a.m. OK FPC TESTS 60 420 4608000 2200
25778371 jkxjkx1031 D March 24, 2017, 4:26 p.m. OK GNU C TESTS 60 140 6144000 2200
27292770 vjudge5 D May 23, 2017, 2:13 a.m. OK GNU C++ TESTS 60 15 4812800 2200
29766581 vjudge1 D Aug. 25, 2017, 3:11 a.m. OK GNU C++ TESTS 60 30 3379200 2200
25648317 zeinsakkour2001 D March 19, 2017, 2:22 p.m. OK GNU C++ TESTS 60 30 3686400 2200
27313122 150137 D May 24, 2017, 2:59 a.m. OK GNU C++ TESTS 60 30 5017600 2200
29451504 vjudge3 D Aug. 14, 2017, 7:33 a.m. OK GNU C++ TESTS 60 30 7065600 2200
29450778 vjudge3 D Aug. 14, 2017, 7:05 a.m. OK GNU C++ TESTS 60 30 7065600 2200
27630482 AkaneSasu D June 7, 2017, 10:34 a.m. OK GNU C++ TESTS 60 31 3174400 2200
27628065 King_of_Paladins D June 7, 2017, 7:59 a.m. OK GNU C++ TESTS 60 31 3174400 2200
27541924 vjudge5 D June 3, 2017, 11:06 a.m. OK GNU C++ TESTS 60 31 3174400 2200
40982019 ReaLNero1 D July 30, 2018, 6:14 p.m. OK GNU C++ TESTS 60 31 3276800 2200
40502118 Codefans D July 18, 2018, 6:46 a.m. OK GNU C11 TESTS 60 124 6656000 2200
25687309 shdut D March 21, 2017, 11:55 a.m. OK GNU C++11 TESTS 60 30 4710400 2200
46016301 chicaideji D Nov. 21, 2018, 3:53 a.m. OK GNU C++11 TESTS 60 31 1638400 2200
61303987 suuuuy D Sept. 26, 2019, 6:24 a.m. OK GNU C++11 TESTS 60 31 2560000 2200
63552940 bei_li D Oct. 27, 2019, 12:06 p.m. OK GNU C++11 TESTS 60 31 2560000 2200
53395798 Pigbrain D April 27, 2019, 9:06 a.m. OK GNU C++11 TESTS 60 31 2662400 2200
64634075 YuWenzhou D Nov. 10, 2019, 11:04 a.m. OK GNU C++11 TESTS 60 31 2662400 2200
63624076 zrj_cyh D Oct. 28, 2019, 2:08 a.m. OK GNU C++11 TESTS 60 31 3276800 2200
44435462 mmmod_lqs D Oct. 17, 2018, 9:45 a.m. OK GNU C++11 TESTS 60 31 3379200 2200
58433005 GCCCCCCC D Aug. 7, 2019, 12:40 p.m. OK GNU C++11 TESTS 60 31 3379200 2200
40301438 hhhjhy D July 14, 2018, 2:23 a.m. OK GNU C++11 TESTS 60 31 3481600 2200
26158210 krijgertje D April 5, 2017, 8:28 p.m. OK GNU C++14 TESTS 60 30 4505600 2200
34611057 nikolayterek D Jan. 27, 2018, 4:10 p.m. OK GNU C++14 TESTS 60 30 5632000 2200
25955657 sniose D March 30, 2017, 2:31 p.m. OK GNU C++14 TESTS 60 30 6860800 2200
27347409 code_kika D May 26, 2017, 2:25 a.m. OK GNU C++14 TESTS 60 31 3584000 2200
28007024 lukecavabarrett D June 24, 2017, 2:27 p.m. OK GNU C++14 TESTS 60 31 3788800 2200
38342148 zsc. D May 17, 2018, 8:24 a.m. OK GNU C++14 TESTS 60 31 3891200 2200
25895155 OnionPringles D March 29, 2017, 12:15 p.m. OK GNU C++14 TESTS 60 31 4505600 2200
67023846 yan-zp D Dec. 16, 2019, 1:46 p.m. OK GNU C++14 TESTS 60 31 4608000 2200
31235271 Oktavia D Oct. 12, 2017, 8:13 a.m. OK GNU C++14 TESTS 60 31 4812800 2200
25729060 cella.florescu D March 23, 2017, 8:54 a.m. OK GNU C++14 TESTS 60 31 4915200 2200
50784168 2ooWeak2ooSlow2ooDumb D March 4, 2019, 12:41 p.m. OK GNU C++17 TESTS 60 31 3788800 2200
64738536 vjudge3 D Nov. 12, 2019, 11:12 a.m. OK GNU C++17 TESTS 60 31 5017600 2200
57325904 Jim_Carrey D July 19, 2019, 12:07 p.m. OK GNU C++17 TESTS 60 31 5017600 2200
57325443 Jim_Carrey D July 19, 2019, 11:55 a.m. OK GNU C++17 TESTS 60 31 5017600 2200
41562255 Notbesidemoon D Aug. 13, 2018, 3:02 p.m. OK GNU C++17 TESTS 60 31 5017600 2200
45509226 vjudge2 D Nov. 10, 2018, 12:12 p.m. OK GNU C++17 TESTS 60 31 5222400 2200
45421485 Asagami D Nov. 7, 2018, 5:33 p.m. OK GNU C++17 TESTS 60 31 5222400 2200
43582713 pratikgk45 D Sept. 29, 2018, 6:13 p.m. OK GNU C++17 TESTS 60 31 5324800 2200
68448801 yuzining D Jan. 9, 2020, 1:37 p.m. OK GNU C++17 TESTS 60 46 3788800 2200
68452157 PinYin D Jan. 9, 2020, 2:44 p.m. OK GNU C++17 TESTS 60 46 5017600 2200
25941601 Fantasy-zwj D March 30, 2017, 5:32 a.m. OK Java 8 TESTS 60 124 20275200 2200
25941540 Fantasy-zwj D March 30, 2017, 5:29 a.m. OK Java 8 TESTS 60 124 20275200 2200
42143989 rahulkhairwar D Aug. 27, 2018, 7:42 a.m. OK Java 8 TESTS 60 155 0 2200
25929066 Buried D March 29, 2017, 6:12 p.m. OK Java 8 TESTS 60 171 26931200 2200
26504821 OmarRadwan D April 19, 2017, 10:06 p.m. OK Java 8 TESTS 60 249 20377600 2200
28180787 tri D June 30, 2017, 10:10 p.m. OK Java 8 TESTS 60 264 20684800 2200
39031385 RussianBot D June 7, 2018, 8:45 p.m. OK Java 8 TESTS 60 280 0 2200
26248567 PrakharJain D April 10, 2017, 7:20 a.m. OK Java 8 TESTS 60 343 20582400 2200
26045811 Maulik_Patel D April 1, 2017, 7:24 a.m. OK Java 8 TESTS 60 343 20582400 2200
25708287 TheRedLegend D March 22, 2017, 10:22 a.m. OK Java 8 TESTS 60 358 20992000 2200
30532217 vjudge3 D Sept. 20, 2017, 1:35 a.m. OK MS C++ TESTS 60 31 4198400 2200
25777993 miumiu D March 24, 2017, 4:05 p.m. OK MS C++ TESTS 60 31 6963200 2200
61322363 vjudge1 D Sept. 26, 2019, 12:56 p.m. OK MS C++ TESTS 60 46 2662400 2200
44720985 vjudge5 D Oct. 23, 2018, 5:05 a.m. OK MS C++ TESTS 60 46 5017600 2200
26794899 P___ D May 2, 2017, 2:27 a.m. OK MS C++ TESTS 60 109 3993600 2200
25654338 redoak D March 19, 2017, 7:42 p.m. OK MS C++ TESTS 60 109 7475200 2200
29545237 bojverdict2 D Aug. 18, 2017, 7:08 a.m. OK MS C++ TESTS 60 140 3584000 2200
61359025 vjudge4 D Sept. 27, 2019, 11:31 a.m. OK MS C++ TESTS 60 140 5017600 2200
61359186 vjudge4 D Sept. 27, 2019, 11:34 a.m. OK MS C++ TESTS 60 155 5017600 2200
61347503 vjudge4 D Sept. 27, 2019, 6:01 a.m. OK MS C++ TESTS 60 155 5017600 2200
29627066 DeadPillow D Aug. 20, 2017, 5:42 p.m. OK Python 3 TESTS 60 623 14540800 2200
25769524 YakutovDmitriy D March 24, 2017, 10:40 a.m. OK Python 3 TESTS 60 639 19251200 2200
52547506 saku7 D April 9, 2019, 11:20 p.m. OK Python 3 TESTS 60 826 21913600 2200
38545010 abrunoaa D May 22, 2018, 7:17 p.m. OK Python 3 TESTS 60 1871 9420800 2200
34273676 yugle7 D Jan. 18, 2018, 11:02 a.m. OK Python 3 TESTS 60 1887 15564800 2200
38544987 abrunoaa D May 22, 2018, 7:16 p.m. OK Python 3 TESTS 60 1918 9420800 2200

remove filters

Back to search problems