Educational Codeforces Round 45 (Rated for 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
990 Educational Codeforces Round 45 (Rated for Div. 2) FINISHED False 7200 203198099 June 10, 2018, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5924 ) C Bracket Sequences Concatenation Problem PROGRAMMING implementation 1500

B'A bracket sequence is a string containing only characters "(" and ")". A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, bracket sequences "()()", "(())" are regular (the resulting expressions are: "(1)+(1)", "((1+1)+1)"), and ")(" and "(" are not. You are given n bracket sequences s_1, s_2, ... , s_n . Calculate the number of pairs i, j , (1 <= i, j <= n) such that the bracket sequence s_i + s_j is a regular bracket sequence. Operation + means concatenation i.e. "()(" + ")()" = "()()()". If s_i + s_j and s_j + s_i are regular bracket sequences and i ne j , then both pairs (i, j) and (j, i) must be counted in the answer. Also, if s_i + s_i is a regular bracket sequence, the pair (i, i) must be counted in the answer. The first line contains one integer n , (1 <= n <= 3 cdot 10^5) -- the number of bracket sequences. The following n lines contain bracket sequences -- non-empty strings consisting only of characters "(" and ")". The sum of lengths of all bracket sequences does not exceed 3 cdot 10^5 . In the single line print a single integer -- the number of pairs i, j , (1 <= i, j <= n) such that the bracket sequence s_i + s_j is a regular bracket sequence. In the first example, suitable pairs are (3, 1) and (2, 2) . In the second example, any pair is suitable, namely (1, 1), (1, 2), (2, 1), (2, 2) . '...

Tutorials

Educational Codeforces Round 45 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55332134 vjudge2 C June 9, 2019, 11:37 a.m. OK Clang++17 Diagnostics TESTS 30 468 23552000 1500
41205828 ClemsonStark C Aug. 4, 2018, 7:47 a.m. OK Clang++17 Diagnostics TESTS 30 1248 15052800 1500
39287765 rr_ C June 16, 2018, 12:47 p.m. OK D TESTS 30 109 11776000 1500
39110686 ia7ck C June 10, 2018, 11:30 a.m. OK D TESTS 30 171 4198400 1500
39125572 darkus-_- C June 10, 2018, 3:39 p.m. OK FPC TESTS 30 155 7475200 1500
39124170 darkus-_- C June 10, 2018, 2:38 p.m. OK FPC TESTS 30 171 7475200 1500
39111790 LMOliver C June 10, 2018, 11:35 a.m. OK FPC TESTS 30 171 12288000 1500
43505813 TShT C Sept. 27, 2018, 7:16 p.m. OK FPC TESTS 30 171 18739200 1500
39352292 Dasha_Gnedko C June 18, 2018, 9:37 a.m. OK FPC TESTS 30 249 61849600 1500
39128679 MYNAMEISSHARIFUL C June 10, 2018, 5:57 p.m. OK GNU C TESTS 30 46 2662400 1500
39137561 amolpratap007 C June 11, 2018, 5:50 a.m. OK GNU C TESTS 30 62 5017600 1500
39137552 _codophobia_ C June 11, 2018, 5:49 a.m. OK GNU C TESTS 30 62 5017600 1500
39111887 DanielixS C June 10, 2018, 11:36 a.m. OK GNU C TESTS 30 62 9011200 1500
39108808 C1ariS C June 10, 2018, 11:21 a.m. OK GNU C TESTS 30 77 3891200 1500
39110695 SWHsz C June 10, 2018, 11:30 a.m. OK GNU C++ TESTS 30 30 5427200 1500
41244865 jk17211754 C Aug. 5, 2018, 12:32 p.m. OK GNU C++ TESTS 30 31 614400 1500
41244799 sdibt2 C Aug. 5, 2018, 12:29 p.m. OK GNU C++ TESTS 30 31 614400 1500
41244606 sdibt3 C Aug. 5, 2018, 12:23 p.m. OK GNU C++ TESTS 30 31 614400 1500
39215925 narutohokage C June 13, 2018, 12:17 p.m. OK GNU C++ TESTS 30 31 1024000 1500
39216001 narutohokage C June 13, 2018, 12:21 p.m. OK GNU C++ TESTS 30 31 1024000 1500
39215955 narutohokage C June 13, 2018, 12:19 p.m. OK GNU C++ TESTS 30 31 1024000 1500
40977248 ReaLNero1 C July 30, 2018, 4:06 p.m. OK GNU C++ TESTS 30 31 5427200 1500
40931966 ReaLNero1 C July 30, 2018, 1:29 a.m. OK GNU C++ TESTS 30 31 5427200 1500
39151684 Fulisike C June 11, 2018, 1:47 p.m. OK GNU C++ TESTS 30 31 24064000 1500
39160055 pandrei C June 11, 2018, 2:28 p.m. OK GNU C11 TESTS 30 31 2662400 1500
51521311 rainboy C March 19, 2019, 3:58 p.m. OK GNU C11 TESTS 30 46 2662400 1500
47783995 vjudge2 C Dec. 31, 2018, 9:40 a.m. OK GNU C11 TESTS 30 46 3891200 1500
47028695 vjudge5 C Dec. 15, 2018, 8:30 a.m. OK GNU C11 TESTS 30 46 5427200 1500
47714906 vjudge2 C Dec. 30, 2018, 6:55 a.m. OK GNU C11 TESTS 30 46 11161600 1500
47720000 vjudge5 C Dec. 30, 2018, 10:39 a.m. OK GNU C11 TESTS 30 61 2662400 1500
47952966 vjudge2 C Jan. 5, 2019, 3:24 a.m. OK GNU C11 TESTS 30 61 2662400 1500
47155764 vjudge5 C Dec. 17, 2018, 6:41 a.m. OK GNU C11 TESTS 30 61 5120000 1500
47351239 vjudge2 C Dec. 22, 2018, 3:01 a.m. OK GNU C11 TESTS 30 61 5120000 1500
47386984 vjudge1 C Dec. 23, 2018, 5:47 a.m. OK GNU C11 TESTS 30 61 5120000 1500
44887234 COLINGAO C Oct. 25, 2018, 11:31 p.m. OK GNU C++11 TESTS 30 30 2457600 1500
39136431 Trisolaris C June 11, 2018, 4:39 a.m. OK GNU C++11 TESTS 30 30 3379200 1500
39115114 jakeshen C June 10, 2018, 11:52 a.m. OK GNU C++11 TESTS 30 31 1024000 1500
44887220 SGColin C Oct. 25, 2018, 11:30 p.m. OK GNU C++11 TESTS 30 31 2457600 1500
44243193 vjudge2 C Oct. 13, 2018, 7:42 a.m. OK GNU C++11 TESTS 30 31 2457600 1500
40495938 RNS_MHB C July 18, 2018, 2:20 a.m. OK GNU C++11 TESTS 30 31 2764800 1500
44653697 Xingcy C Oct. 21, 2018, 12:16 p.m. OK GNU C++11 TESTS 30 31 2969600 1500
46581027 Isonan C Dec. 4, 2018, 11:15 a.m. OK GNU C++11 TESTS 30 31 4812800 1500
46584108 memset0c C Dec. 4, 2018, 12:28 p.m. OK GNU C++11 TESTS 30 31 4812800 1500
46583537 luogu_bot4 C Dec. 4, 2018, 12:14 p.m. OK GNU C++11 TESTS 30 31 4812800 1500
39118420 wleung_bvg C June 10, 2018, 12:08 p.m. OK GNU C++14 TESTS 30 30 5427200 1500
39136800 Phos C June 11, 2018, 5:03 a.m. OK GNU C++14 TESTS 30 31 716800 1500
48432332 Hamza C Jan. 15, 2019, 6:08 p.m. OK GNU C++14 TESTS 30 31 819200 1500
39135201 Rajan_sust C June 11, 2018, 3:09 a.m. OK GNU C++14 TESTS 30 31 819200 1500
60660931 vjudge5 C Sept. 16, 2019, 4:47 a.m. OK GNU C++14 TESTS 30 31 1024000 1500
62954092 RedNextCentury C Oct. 19, 2019, 7:45 p.m. OK GNU C++14 TESTS 30 31 1024000 1500
69035340 KasugaAyumu C Jan. 18, 2020, 8:55 a.m. OK GNU C++14 TESTS 30 31 1024000 1500
41124118 SAKIB_ALAMIN C Aug. 2, 2018, 1:25 p.m. OK GNU C++14 TESTS 30 31 1024000 1500
40745883 Afifii C July 25, 2018, 2:40 p.m. OK GNU C++14 TESTS 30 31 1024000 1500
47943754 aman_9875 C Jan. 4, 2019, 5:57 p.m. OK GNU C++14 TESTS 30 31 1024000 1500
64776883 pootis C Nov. 13, 2019, 5:01 a.m. OK GNU C++17 TESTS 30 31 1024000 1500
60463829 TomazGomes C Sept. 12, 2019, 11:01 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
56012805 aniket9465 C June 24, 2019, 7:04 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
46697037 PyAlpha C Dec. 6, 2018, 8:37 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
39240690 nongi C June 14, 2018, 10:53 a.m. OK GNU C++17 TESTS 30 31 1024000 1500
39239750 mylibh C June 14, 2018, 10:19 a.m. OK GNU C++17 TESTS 30 31 1024000 1500
39175705 karasek C June 11, 2018, 9:57 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
39171802 TooDumbToWin C June 11, 2018, 6:08 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
39128817 sodafago C June 10, 2018, 6:03 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
39124743 ilyas_ad C June 10, 2018, 3:02 p.m. OK GNU C++17 TESTS 30 31 1024000 1500
39144774 OYSJ C June 11, 2018, 11:33 a.m. OK GNU C++17 Diagnostics TESTS 30 1419 3788800 1500
39684877 smalex69 C June 26, 2018, 7:39 p.m. OK Go TESTS 30 1435 4608000 1500
39235666 asdacap C June 14, 2018, 8:18 a.m. OK Haskell TESTS 30 233 50585600 1500
39138395 brainddump C June 11, 2018, 6:32 a.m. OK Haskell TESTS 30 311 24371200 1500
51845334 Atomwolfie C March 26, 2019, 4:02 a.m. OK Java 8 TESTS 30 124 0 1500
51536157 Dukkha C March 19, 2019, 5:05 p.m. OK Java 8 TESTS 30 124 0 1500
50702267 Harbin C March 2, 2019, 11:01 p.m. OK Java 8 TESTS 30 124 0 1500
50322169 YousseF_Diaa C Feb. 22, 2019, 3 p.m. OK Java 8 TESTS 30 139 0 1500
48196198 SpargelTarzan C Jan. 10, 2019, 10:23 p.m. OK Java 8 TESTS 30 139 0 1500
39203400 xodiac C June 13, 2018, 12:43 a.m. OK Java 8 TESTS 30 139 0 1500
39146787 vovak C June 11, 2018, 12:46 p.m. OK Java 8 TESTS 30 139 0 1500
54393965 Blastman C May 19, 2019, 6:25 p.m. OK Java 8 TESTS 30 140 0 1500
47607139 llamaoo7 C Dec. 28, 2018, 6:04 a.m. OK Java 8 TESTS 30 140 0 1500
39343094 rahejamehul C June 17, 2018, 8:25 p.m. OK Java 8 TESTS 30 140 0 1500
39110287 0442A403 C June 10, 2018, 11:28 a.m. OK Kotlin TESTS 30 186 0 1500
39115636 juliya1711 C June 10, 2018, 11:54 a.m. OK Mono C# TESTS 30 62 5324800 1500
56306617 og.kostya C June 30, 2019, 12:14 p.m. OK Mono C# TESTS 30 124 6860800 1500
39322916 iHisham C June 17, 2018, 2:28 a.m. OK MS C++ TESTS 30 46 2764800 1500
47724657 vjudge2 C Dec. 30, 2018, 1:33 p.m. OK MS C++ TESTS 30 46 5120000 1500
47605298 vjudge2 C Dec. 28, 2018, 4:13 a.m. OK MS C++ TESTS 30 46 5120000 1500
39110331 hynuxuhuizhi C June 10, 2018, 11:28 a.m. OK MS C++ TESTS 30 61 1536000 1500
39112781 Str1ker C June 10, 2018, 11:40 a.m. OK MS C++ TESTS 30 61 2355200 1500
39322982 iHisham C June 17, 2018, 2:32 a.m. OK MS C++ TESTS 30 61 2662400 1500
39323012 iHisham C June 17, 2018, 2:34 a.m. OK MS C++ TESTS 30 61 2764800 1500
39322748 iHisham C June 17, 2018, 2:16 a.m. OK MS C++ TESTS 30 61 2764800 1500
39322957 iHisham C June 17, 2018, 2:31 a.m. OK MS C++ TESTS 30 61 2764800 1500
39277894 scorpiowf C June 16, 2018, 3:06 a.m. OK MS C++ TESTS 30 62 2662400 1500
69462156 Catmoonlight C Jan. 24, 2020, 11:16 a.m. OK MS C++ 2017 TESTS 30 78 921600 1500
51651014 g-m-blake C March 21, 2019, 6:50 p.m. OK MS C++ 2017 TESTS 30 93 921600 1500
67603940 immortal_luo C Dec. 25, 2019, 12:54 p.m. OK MS C++ 2017 TESTS 30 109 921600 1500
55334808 pinefrost C June 9, 2019, 1:06 p.m. OK MS C++ 2017 TESTS 30 109 921600 1500
68489570 vjudge2 C Jan. 10, 2020, 11:12 a.m. OK MS C++ 2017 TESTS 30 109 3379200 1500
53098901 Foxy663 C April 21, 2019, 3:10 p.m. OK MS C++ 2017 TESTS 30 124 10444800 1500
47178286 mayakin C Dec. 17, 2018, 6:50 p.m. OK PHP TESTS 30 171 0 1500
45454291 YESMAths C Nov. 8, 2018, 6 p.m. OK PyPy 2 TESTS 30 311 46284800 1500
39113314 pavankatta C June 10, 2018, 11:43 a.m. OK PyPy 2 TESTS 30 358 10752000 1500
39125625 nealzane C June 10, 2018, 3:41 p.m. OK PyPy 2 TESTS 30 732 4198400 1500
39117706 supachai_pay C June 10, 2018, 12:03 p.m. OK PyPy 2 TESTS 30 748 6451200 1500
39134826 luke888 C June 11, 2018, 2:34 a.m. OK PyPy 2 TESTS 30 794 11776000 1500
39251982 sasasagagaga C June 14, 2018, 7:10 p.m. OK PyPy 2 TESTS 30 795 13926400 1500
39207409 EON_KID C June 13, 2018, 6:10 a.m. OK PyPy 2 TESTS 30 904 17612800 1500
39122488 sergovoy C June 10, 2018, 1:37 p.m. OK PyPy 3 TESTS 30 249 13107200 1500
39121681 sergovoy C June 10, 2018, 1:12 p.m. OK PyPy 3 TESTS 30 264 13107200 1500
39131573 bernie C June 10, 2018, 8:38 p.m. OK PyPy 3 TESTS 30 311 35328000 1500
45897032 mug C Nov. 17, 2018, 11:56 p.m. OK PyPy 3 TESTS 30 327 20070400 1500
39137524 artemuk C June 11, 2018, 5:48 a.m. OK PyPy 3 TESTS 30 1590 8294400 1500
39125468 dvec C June 10, 2018, 3:34 p.m. OK PyPy 3 TESTS 30 1591 15769600 1500
39110648 cgfs10000 C June 10, 2018, 11:30 a.m. OK PyPy 3 TESTS 30 1637 24166400 1500
57612332 AndreyL C July 23, 2019, 10 p.m. OK PyPy 3 TESTS 30 1887 9523200 1500
57612280 AndreyL C July 23, 2019, 9:57 p.m. OK PyPy 3 TESTS 30 1934 9625600 1500
60924008 ashok123 C Sept. 20, 2019, 11:40 a.m. OK PyPy 3 TESTS 30 1965 8704000 1500
39247899 tanghao C June 14, 2018, 3:17 p.m. OK Python 2 TESTS 30 467 4915200 1500
39167826 Ali_Pi C June 11, 2018, 3:35 p.m. OK Python 2 TESTS 30 514 5017600 1500
39122522 PBatch C June 10, 2018, 1:39 p.m. OK Python 2 TESTS 30 623 7475200 1500
39127860 alankrit_singh_1 C June 10, 2018, 5:24 p.m. OK Python 2 TESTS 30 670 7680000 1500
39201133 tnowakow C June 12, 2018, 8:47 p.m. OK Python 2 TESTS 30 935 7782400 1500
39247746 orailly C June 14, 2018, 3:08 p.m. OK Python 3 TESTS 30 358 6963200 1500
39122507 sergovoy C June 10, 2018, 1:38 p.m. OK Python 3 TESTS 30 483 7372800 1500
39185886 ien49fh C June 12, 2018, 9:05 a.m. OK Python 3 TESTS 30 545 7987200 1500
51846265 kinte C March 26, 2019, 4:52 a.m. OK Python 3 TESTS 30 592 6451200 1500
51730543 vjudge4 C March 22, 2019, 8:57 p.m. OK Python 3 TESTS 30 592 6451200 1500
51730583 kinte C March 22, 2019, 8:58 p.m. OK Python 3 TESTS 30 623 6348800 1500
47705903 lerooo C Dec. 29, 2018, 8:18 p.m. OK Python 3 TESTS 30 670 7475200 1500
42047164 merelj C Aug. 24, 2018, 3:54 p.m. OK Python 3 TESTS 30 732 1024000 1500
39672658 Pratik_2106 C June 26, 2018, 10:28 a.m. OK Python 3 TESTS 30 733 819200 1500
39435924 MajAK C June 20, 2018, 12:35 p.m. OK Python 3 TESTS 30 733 819200 1500
39113684 AnandVeeramani C June 10, 2018, 11:45 a.m. OK Ruby TESTS 30 670 51507200 1500
39164467 yxawpKL C June 11, 2018, 3:05 p.m. OK Ruby TESTS 30 1435 29081600 1500
39340174 nitishch C June 17, 2018, 4:46 p.m. OK Rust TESTS 30 93 3481600 1500
39109067 cojna C June 10, 2018, 11:22 a.m. OK Rust TESTS 30 93 36864000 1500

remove filters

Back to search problems