Codeforces Round 375 (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
723 Codeforces Round 375 (Div. 2) FINISHED False 9000 262117504 Oct. 3, 2016, 11:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10251 ) B Text Document Analysis PROGRAMMING expression parsing implementation strings 1100

B'Modern text editors usually show some information regarding the document being edited. For example, the number of words, the number of pages, or the number of characters. In this problem you should implement the similar functionality. You are given a string which only consists of: It is guaranteed that each opening parenthesis has a succeeding closing parenthesis. Similarly, each closing parentheses has a preceding opening parentheses matching it. For each pair of matching parentheses there are no other parenthesis between them. In other words, each parenthesis in the string belongs to a matching "opening-closing" pair, and such pairs can 't be nested. For example, the following string is valid: "_Hello_Vasya(and_Petya)__bye_(and_OK)". Word is a maximal sequence of consecutive letters, i.e. such sequence that the first character to the left and the first character to the right of it is an underscore, a parenthesis, or it just does not exist. For example, the string above consists of seven words: "Hello", "Vasya", "and", "Petya", "bye", "and" and "OK". Write a program that finds: The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89255) -- the length of the given string. The second line contains the string consisting of only lowercase and uppercase English letters, parentheses and underscore symbols. Print two space-separated integers: In the first sample, the words "Hello", "Vasya" and "bye" are outside any of the parentheses, and the words "and", "Petya", "and" and "OK" are inside. Note, that the word "and" is given twice and you should count it twice in the answer. '...

Tutorials

Codeforces Round #375 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
21426205 compisit B Oct. 14, 2016, 3:21 p.m. OK D TESTS 41 15 2969600 1100
21336751 EvieOneLove B Oct. 10, 2016, 11:44 a.m. OK Delphi TESTS 41 15 2560000 1100
21375609 upfeed B Oct. 12, 2016, 7:32 a.m. OK Delphi TESTS 41 15 2560000 1100
21712826 zhbannikovdima B Oct. 23, 2016, 12:55 p.m. OK FPC TESTS 41 15 0 1100
27473458 VladProg B May 31, 2017, 7:39 p.m. OK FPC TESTS 41 15 102400 1100
22052995 GavrilovOleg B Nov. 5, 2016, 9:53 a.m. OK FPC TESTS 41 15 307200 1100
22461128 Tenpole B Nov. 24, 2016, 7:40 a.m. OK FPC TESTS 41 15 307200 1100
22561151 Shadowest B Nov. 27, 2016, 10:05 p.m. OK FPC TESTS 41 15 307200 1100
22661377 lukomskiy B Dec. 2, 2016, 4:24 p.m. OK FPC TESTS 41 15 307200 1100
22894150 ice_tea B Dec. 11, 2016, 9 p.m. OK FPC TESTS 41 15 307200 1100
21960098 hq_chopper B Nov. 1, 2016, 7:54 a.m. OK FPC TESTS 41 15 409600 1100
35812506 vjudge3 B March 1, 2018, 1:30 p.m. OK FPC TESTS 41 15 1945600 1100
34180421 romashka B Jan. 14, 2018, 4:33 p.m. OK FPC TESTS 41 15 1945600 1100
32537913 Adham74 B Nov. 22, 2017, 12:20 a.m. OK GNU C TESTS 41 15 0 1100
32564746 ZGryphonZ B Nov. 23, 2017, 2:16 a.m. OK GNU C TESTS 41 15 0 1100
32564283 Gryphonz B Nov. 23, 2017, 1:15 a.m. OK GNU C TESTS 41 15 0 1100
32559794 Debasish1610177113 B Nov. 22, 2017, 7:09 p.m. OK GNU C TESTS 41 15 0 1100
32537280 Michael_Farahat B Nov. 21, 2017, 10:52 p.m. OK GNU C TESTS 41 15 0 1100
32511587 Sherif1337 B Nov. 20, 2017, 9:22 p.m. OK GNU C TESTS 41 15 0 1100
32503040 Ahmad_Mazloum B Nov. 20, 2017, 2:42 p.m. OK GNU C TESTS 41 15 0 1100
32425968 alim98 B Nov. 18, 2017, 9:23 a.m. OK GNU C TESTS 41 15 0 1100
32417737 Shirbo B Nov. 18, 2017, 1:35 a.m. OK GNU C TESTS 41 15 0 1100
32416319 Mahmoud_693 B Nov. 17, 2017, 11:26 p.m. OK GNU C TESTS 41 15 0 1100
32418842 techi21 B Nov. 18, 2017, 2:57 a.m. OK GNU C++ TESTS 41 15 0 1100
32413629 Hagar_Usama B Nov. 17, 2017, 8:35 p.m. OK GNU C++ TESTS 41 15 0 1100
31998065 vjudge5 B Nov. 3, 2017, 6 a.m. OK GNU C++ TESTS 41 15 0 1100
31801594 vjudge4 B Oct. 27, 2017, 2:22 p.m. OK GNU C++ TESTS 41 15 0 1100
31186222 kamal_chaubey1 B Oct. 10, 2017, 10:02 a.m. OK GNU C++ TESTS 41 15 0 1100
31140345 vjudge1 B Oct. 8, 2017, 10:18 a.m. OK GNU C++ TESTS 41 15 0 1100
31088892 Dherion B Oct. 6, 2017, 5:38 p.m. OK GNU C++ TESTS 41 15 0 1100
30865660 Vasiljko B Sept. 30, 2017, 12:05 p.m. OK GNU C++ TESTS 41 15 0 1100
30799386 vjudge4 B Sept. 28, 2017, 8:51 a.m. OK GNU C++ TESTS 41 15 0 1100
30312174 nafiamahjabin B Sept. 13, 2017, 4:48 p.m. OK GNU C++ TESTS 41 15 0 1100
21697940 Drowning_Prince B Oct. 23, 2016, 4:37 a.m. OK GNU C11 TESTS 41 15 0 1100
32351505 DCount B Nov. 16, 2017, 9:36 a.m. OK GNU C11 TESTS 41 15 0 1100
32326890 zoroo30 B Nov. 15, 2017, 8:04 a.m. OK GNU C11 TESTS 41 15 0 1100
32320515 Amr.Mustafa B Nov. 14, 2017, 9:16 p.m. OK GNU C11 TESTS 41 15 0 1100
32273063 Karamawy B Nov. 12, 2017, 10:19 p.m. OK GNU C11 TESTS 41 15 0 1100
27840119 niloyibtasham B June 17, 2017, 7:22 a.m. OK GNU C11 TESTS 41 15 0 1100
22594262 amrzawawy B Nov. 29, 2016, 8:33 a.m. OK GNU C11 TESTS 41 15 0 1100
32648345 akakak B Nov. 25, 2017, 1:26 p.m. OK GNU C11 TESTS 41 15 1843200 1100
23243715 pikachucoding B Dec. 23, 2016, 8:58 a.m. OK GNU C11 TESTS 41 15 1945600 1100
37701545 vjudge4 B April 29, 2018, 6:22 a.m. OK GNU C11 TESTS 41 15 3379200 1100
31698848 vjudge3 B Oct. 25, 2017, 4:52 a.m. OK GNU C++11 TESTS 41 15 0 1100
39695733 Bird_pnz B June 27, 2018, 8:32 a.m. OK GNU C++11 TESTS 41 15 0 1100
39497400 ahmedelhemaly1997 B June 21, 2018, 6:12 p.m. OK GNU C++11 TESTS 41 15 0 1100
38697720 MoMo B May 28, 2018, 3:07 p.m. OK GNU C++11 TESTS 41 15 0 1100
32356152 Mikaeel B Nov. 16, 2017, 1:23 p.m. OK GNU C++11 TESTS 41 15 0 1100
32351000 mayssaraomar B Nov. 16, 2017, 9:06 a.m. OK GNU C++11 TESTS 41 15 0 1100
32315911 hopeAconce B Nov. 14, 2017, 3:52 p.m. OK GNU C++11 TESTS 41 15 0 1100
31998056 SpiffyEight77 B Nov. 3, 2017, 6 a.m. OK GNU C++11 TESTS 41 15 0 1100
30867115 Muhamed.Ahmed B Sept. 30, 2017, 1 p.m. OK GNU C++11 TESTS 41 15 0 1100
30806027 rares2004 B Sept. 28, 2017, 1:27 p.m. OK GNU C++11 TESTS 41 15 0 1100
41534338 ye7iaa B Aug. 12, 2018, 4:33 p.m. OK GNU C++14 TESTS 41 15 0 1100
42246760 master-mahmoudAcm B Aug. 29, 2018, 3:46 p.m. OK GNU C++14 TESTS 41 15 0 1100
44376507 manasvijangid21 B Oct. 15, 2018, 9:56 p.m. OK GNU C++14 TESTS 41 15 0 1100
44387339 vjudge5 B Oct. 16, 2018, 6:34 a.m. OK GNU C++14 TESTS 41 15 0 1100
45666227 ongvnn B Nov. 13, 2018, 7:42 a.m. OK GNU C++14 TESTS 41 15 0 1100
46464974 Abdo_kamr B Dec. 2, 2018, 1:43 a.m. OK GNU C++14 TESTS 41 15 0 1100
48512003 SohrabRoohi B Jan. 17, 2019, 10:32 p.m. OK GNU C++14 TESTS 41 15 0 1100
52644114 Mendokusaiii B April 12, 2019, 1:44 p.m. OK GNU C++14 TESTS 41 15 0 1100
66214889 Scut82 B Dec. 3, 2019, 8:29 a.m. OK GNU C++14 TESTS 41 15 0 1100
66218237 Scut82 B Dec. 3, 2019, 9:52 a.m. OK GNU C++14 TESTS 41 15 0 1100
68456927 MatveyR B Jan. 9, 2020, 4:36 p.m. OK GNU C++17 TESTS 41 15 0 1100
58524666 H_a_c_k_m_e B Aug. 10, 2019, 6:35 a.m. OK GNU C++17 TESTS 41 15 0 1100
57263343 __Dima__ B July 18, 2019, 6:11 a.m. OK GNU C++17 TESTS 41 15 0 1100
54987853 wrong_answer B June 2, 2019, 4:44 p.m. OK GNU C++17 TESTS 41 15 0 1100
54881198 Shreyansh_sinha B May 31, 2019, 2:25 p.m. OK GNU C++17 TESTS 41 15 0 1100
52739930 Snpilola B April 14, 2019, 8:26 a.m. OK GNU C++17 TESTS 41 15 0 1100
51806374 __REXX__ B March 24, 2019, 10:14 p.m. OK GNU C++17 TESTS 41 15 0 1100
51446287 __Ash__ B March 18, 2019, 12:38 p.m. OK GNU C++17 TESTS 41 15 0 1100
47100857 arian000 B Dec. 16, 2018, 10:39 a.m. OK GNU C++17 TESTS 41 15 0 1100
39695348 amankumar B June 27, 2018, 8:16 a.m. OK GNU C++17 TESTS 41 15 0 1100
21381209 binhuq B Oct. 12, 2016, 12:27 p.m. OK Go TESTS 41 15 4915200 1100
22851168 496005262 B Dec. 10, 2016, 8:40 a.m. OK Go TESTS 41 15 18022400 1100
23871775 yuliang B Jan. 16, 2017, 2:40 a.m. OK Go TESTS 41 15 23142400 1100
21766513 isurugieri B Oct. 25, 2016, 8:32 a.m. OK Go TESTS 41 30 102400 1100
21327031 vector9x B Oct. 9, 2016, 8:58 p.m. OK Go TESTS 41 31 4915200 1100
69890533 pranavmenon0810 B Jan. 31, 2020, 9:50 a.m. OK Java 11 TESTS 41 202 0 1100
68372718 Rohit777singh B Jan. 7, 2020, 6:20 p.m. OK Java 11 TESTS 41 202 0 1100
25883332 Ballan B March 28, 2017, 8:36 p.m. OK Java 8 TESTS 41 108 20480000 1100
27940433 tomdmitriev B June 21, 2017, 8:10 a.m. OK Java 8 TESTS 41 108 20480000 1100
26588538 _bibhuty_ B April 22, 2017, 4:54 p.m. OK Java 8 TESTS 41 108 20480000 1100
52373013 CharlesDai B April 6, 2019, 7:04 a.m. OK Java 8 TESTS 41 109 0 1100
46104045 I.A.K.O.V B Nov. 23, 2018, 8:01 a.m. OK Java 8 TESTS 41 109 0 1100
69016569 akshaybhansali101 B Jan. 18, 2020, 5:26 a.m. OK Java 8 TESTS 41 109 0 1100
65934999 dpark3542 B Nov. 29, 2019, 1:05 a.m. OK Java 8 TESTS 41 109 0 1100
59428417 pink_codes B Aug. 25, 2019, 4:41 a.m. OK Java 8 TESTS 41 109 0 1100
53684067 sameer_hack B May 2, 2019, 9:58 p.m. OK Java 8 TESTS 41 109 0 1100
52485597 KrisDo B April 8, 2019, 8:46 a.m. OK Java 8 TESTS 41 109 0 1100
23772105 vchilikov B Jan. 12, 2017, 9:46 p.m. OK JavaScript TESTS 41 31 5939200 1100
23771973 vchilikov B Jan. 12, 2017, 9:35 p.m. OK JavaScript TESTS 41 77 5939200 1100
61742541 rhtyme B Oct. 2, 2019, 9:06 p.m. OK Kotlin TESTS 41 140 0 1100
21434280 dyukha B Oct. 14, 2016, 10:46 p.m. OK Kotlin TESTS 41 233 22732800 1100
27787109 tianchi B June 15, 2017, 6:02 a.m. OK Mono C# TESTS 41 46 102400 1100
65298264 Zaheed B Nov. 18, 2019, 12:19 p.m. OK Mono C# TESTS 41 61 0 1100
43811156 nemars B Oct. 5, 2018, 12:47 a.m. OK Mono C# TESTS 41 62 3584000 1100
21518587 TautCony B Oct. 17, 2016, 12:21 p.m. OK Mono C# TESTS 41 155 12288000 1100
31868747 aceeca1 B Oct. 29, 2017, 1:57 p.m. OK MS C# TESTS 41 46 0 1100
22922497 Mem B Dec. 13, 2016, 8:46 a.m. OK MS C# TESTS 41 46 0 1100
22477947 T-D-K B Nov. 24, 2016, 7:37 p.m. OK MS C# TESTS 41 46 102400 1100
21377399 maxqw1 B Oct. 12, 2016, 9:12 a.m. OK MS C# TESTS 41 46 9011200 1100
23092799 zazak B Dec. 18, 2016, 11:34 a.m. OK MS C# TESTS 41 46 9011200 1100
33399911 Skndr B Dec. 19, 2017, 7:12 a.m. OK MS C# TESTS 41 46 9216000 1100
21362722 EvilKingStan B Oct. 11, 2016, 3:39 p.m. OK MS C# TESTS 41 61 9011200 1100
22137346 asd45f B Nov. 9, 2016, 6:54 p.m. OK MS C# TESTS 41 62 102400 1100
21427549 og.kostya B Oct. 14, 2016, 4:14 p.m. OK MS C# TESTS 41 62 8908800 1100
24634548 ShowStopper728 B Feb. 13, 2017, 6:37 p.m. OK MS C# TESTS 41 62 11366400 1100
22368131 vjudge3 B Nov. 20, 2016, 3:57 p.m. OK MS C++ TESTS 41 15 0 1100
23021452 scorpiowf B Dec. 16, 2016, 3:19 a.m. OK MS C++ TESTS 41 15 0 1100
22723872 Ally0729 B Dec. 6, 2016, 6:09 a.m. OK MS C++ TESTS 41 15 0 1100
22697643 irain B Dec. 4, 2016, 2:30 p.m. OK MS C++ TESTS 41 15 0 1100
22659597 Abanob_Emad66 B Dec. 2, 2016, 2:38 p.m. OK MS C++ TESTS 41 15 0 1100
22485015 Stawro-Walaa B Nov. 25, 2016, 8:37 a.m. OK MS C++ TESTS 41 15 0 1100
22369937 George.Samuel B Nov. 20, 2016, 5:26 p.m. OK MS C++ TESTS 41 15 0 1100
22342277 ernestfan B Nov. 20, 2016, 7:28 a.m. OK MS C++ TESTS 41 15 0 1100
22331181 Youness B Nov. 19, 2016, 2:32 p.m. OK MS C++ TESTS 41 15 0 1100
22195158 vjudge1 B Nov. 13, 2016, 3:05 p.m. OK MS C++ TESTS 41 15 0 1100
58410692 vjudge2 B Aug. 7, 2019, 1:27 a.m. OK MS C++ 2017 TESTS 41 31 0 1100
67056552 sara.mhdz B Dec. 17, 2019, 7:07 a.m. OK MS C++ 2017 TESTS 41 31 0 1100
68715689 CtrlAlt B Jan. 13, 2020, 2:23 p.m. OK MS C++ 2017 TESTS 41 31 307200 1100
62059027 Mad112233 B Oct. 7, 2019, 1:02 p.m. OK MS C++ 2017 TESTS 41 46 0 1100
63508957 Ragnarok54 B Oct. 26, 2019, 7:46 p.m. OK MS C++ 2017 TESTS 41 46 307200 1100
39755684 Nadzor B June 29, 2018, 1:26 a.m. OK PascalABC.NET TESTS 41 62 102400 1100
21730230 Hasher B Oct. 23, 2016, 10:01 p.m. OK Perl TESTS 41 31 0 1100
21730229 Hasher B Oct. 23, 2016, 10:01 p.m. OK Perl TESTS 41 31 0 1100
23575495 Mahakarma B Jan. 6, 2017, 2:36 a.m. OK Perl TESTS 41 31 2150400 1100
21563745 skamz B Oct. 18, 2016, 10:25 a.m. OK PHP TESTS 41 31 4710400 1100
22301019 turbo_power B Nov. 18, 2016, 6:32 a.m. OK PHP TESTS 41 46 0 1100
24234049 Mosyagin B Jan. 28, 2017, 7:54 p.m. OK PHP TESTS 41 46 6041600 1100
27677383 lateralus B June 8, 2017, 6:48 p.m. OK PyPy 2 TESTS 41 62 0 1100
29090589 mola.mola B Aug. 1, 2017, 7:07 a.m. OK PyPy 3 TESTS 41 93 23142400 1100
30097959 KienMN B Sept. 5, 2017, 11:30 a.m. OK PyPy 3 TESTS 41 108 0 1100
59625609 Leendertz B Aug. 28, 2019, 3:49 p.m. OK PyPy 3 TESTS 41 124 0 1100
22094134 gokjer B Nov. 7, 2016, 12:31 p.m. OK PyPy 3 TESTS 41 124 0 1100
31303010 sonya123 B Oct. 14, 2017, 11:33 a.m. OK PyPy 3 TESTS 41 124 307200 1100
68287721 galim665 B Jan. 5, 2020, 7:18 p.m. OK PyPy 3 TESTS 41 140 0 1100
59084520 tanu38 B Aug. 19, 2019, 10:33 a.m. OK PyPy 3 TESTS 41 140 102400 1100
59320665 XOR-star B Aug. 22, 2019, 6:13 p.m. OK PyPy 3 TESTS 41 155 0 1100
69931119 karan650g B Jan. 31, 2020, 11:52 p.m. OK PyPy 3 TESTS 41 156 0 1100
57429095 kchau B July 20, 2019, 10:59 p.m. OK PyPy 3 TESTS 41 171 102400 1100
31369918 darkknight896 B Oct. 15, 2017, 3:04 p.m. OK Python 2 TESTS 41 46 0 1100
22106493 DukeOfYork B Nov. 8, 2016, 6:16 a.m. OK Python 2 TESTS 41 46 0 1100
21378388 attiw B Oct. 12, 2016, 10:07 a.m. OK Python 2 TESTS 41 46 4608000 1100
21370624 skavurskaa B Oct. 11, 2016, 10:24 p.m. OK Python 2 TESTS 41 46 4608000 1100
25886206 n_n B March 29, 2017, 2:21 a.m. OK Python 2 TESTS 41 46 4710400 1100
25275840 raj454raj B March 5, 2017, 11:32 p.m. OK Python 2 TESTS 41 46 4710400 1100
24949893 Unlenin B Feb. 23, 2017, 10:37 p.m. OK Python 2 TESTS 41 46 4710400 1100
23616202 yamstudio B Jan. 7, 2017, 4 a.m. OK Python 2 TESTS 41 46 4710400 1100
23475824 howly B Dec. 31, 2016, 9:36 p.m. OK Python 2 TESTS 41 46 4710400 1100
23475170 howly B Dec. 31, 2016, 8:20 p.m. OK Python 2 TESTS 41 46 4710400 1100
30687471 DK318 B Sept. 24, 2017, 6:15 p.m. OK Python 3 TESTS 41 46 0 1100
32488306 vjudge5 B Nov. 20, 2017, 3:19 a.m. OK Python 3 TESTS 41 61 0 1100
30761525 swapnilsmn B Sept. 26, 2017, 7:37 p.m. OK Python 3 TESTS 41 61 0 1100
34705226 MaxHo B Jan. 30, 2018, 10:31 a.m. OK Python 3 TESTS 41 61 5632000 1100
32522594 vjudge2 B Nov. 21, 2017, 10:57 a.m. OK Python 3 TESTS 41 62 0 1100
32517948 ving.xia B Nov. 21, 2017, 6:57 a.m. OK Python 3 TESTS 41 62 0 1100
32489545 vjudge2 B Nov. 20, 2017, 5:04 a.m. OK Python 3 TESTS 41 62 0 1100
32488298 FutureTwT B Nov. 20, 2017, 3:18 a.m. OK Python 3 TESTS 41 62 0 1100
31321435 sonya123 B Oct. 14, 2017, 6:54 p.m. OK Python 3 TESTS 41 62 0 1100
27201335 harword B May 18, 2017, 5:02 p.m. OK Python 3 TESTS 41 62 0 1100
29025678 sinapusu2002 B July 30, 2017, 7:29 p.m. OK Ruby TESTS 41 62 6553600 1100
22902598 techaddict B Dec. 12, 2016, 11:37 a.m. OK Scala TESTS 41 295 0 1100
21433000 reldan B Oct. 14, 2016, 8:47 p.m. OK Scala TESTS 41 326 39833600 1100
63882767 Mocker B Oct. 30, 2019, 10:04 p.m. OK Scala TESTS 41 420 0 1100

remove filters

Back to search problems