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 |
---|---|---|---|---|---|---|
1556 | Deltix Round, Summer 2021 (open for everyone, rated, Div. 1 + Div. 2) | FINISHED | False | 9000 | 101575499 | Aug. 29, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5824 ) | C | Compressed Bracket Sequence | PROGRAMMING | brute force implementation | 1800 |
B'William has a favorite bracket sequence. Since his favorite sequence is quite big he provided it to you as a sequence of positive integers c_1, c_2, ... , c_n where c_i is the number of consecutive brackets "(" if i is an odd number or the number of consecutive brackets ")" if i is an even number. For example for a bracket sequence "((())()))" a corresponding sequence of numbers is [3, 2, 1, 3] . You need to find the total number of continuous subsequences (subsegments) [l, r] ( l <= r ) of the original bracket sequence, which are regular bracket sequences. A bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters "+" and "1" into this sequence. For example, sequences "(())()", "()" and "(()(()))" are regular, while ")(", "(()" and "(()))(" are not. The first line contains a single integer n (1 <= n <= 1000) , the size of the compressed sequence. The second line contains a sequence of integers c_1, c_2, ... , c_n (1 <= c_i <= 10^9) , the compressed sequence. Output a single integer -- the total number of subsegments of the original bracket sequence, which are regular bracket sequences. It can be proved that the answer fits in the signed 64-bit integer data type. In the first example a sequence (((()(()))( is described. This bracket sequence contains 5 subsegments which form regular bracket sequences: In the second example a sequence ()))(()(()))) is described. In the third example a sequence ()()(()) is described. '... |
94384 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
127399834 | CrMo | C | Aug. 29, 2021, 7:31 p.m. | OK | GNU C++14 | TESTS | 90 | 15 | 3788800 | 1800 | |
127380298 | MiyanoShiho | C | Aug. 29, 2021, 4:27 p.m. | OK | GNU C++14 | TESTS | 90 | 15 | 3993600 | 1800 | |
127407054 | SuperJ6 | C | Aug. 30, 2021, 12:01 a.m. | OK | GNU C++14 | TESTS | 90 | 30 | 3788800 | 1800 | |
127390778 | hnjhd | C | Aug. 29, 2021, 5:02 p.m. | OK | GNU C++14 | TESTS | 90 | 30 | 3788800 | 1800 | |
127393987 | Taran106 | C | Aug. 29, 2021, 6:04 p.m. | OK | GNU C++14 | TESTS | 90 | 30 | 11776000 | 1800 | |
127410850 | Wuyanru | C | Aug. 30, 2021, 2:29 a.m. | OK | GNU C++14 | TESTS | 90 | 31 | 3686400 | 1800 | |
127382428 | Potassium_ | C | Aug. 29, 2021, 4:34 p.m. | OK | GNU C++14 | TESTS | 90 | 31 | 3686400 | 1800 | |
127420409 | JOJO55555 | C | Aug. 30, 2021, 6 a.m. | OK | GNU C++14 | TESTS | 90 | 31 | 3788800 | 1800 | |
127420230 | Ericxiaoxi | C | Aug. 30, 2021, 5:57 a.m. | OK | GNU C++14 | TESTS | 90 | 31 | 3788800 | 1800 | |
127420010 | zhabuye | C | Aug. 30, 2021, 5:53 a.m. | OK | GNU C++14 | TESTS | 90 | 31 | 3788800 | 1800 | |
127406053 | tusharc31 | C | Aug. 29, 2021, 11:04 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 3788800 | 1800 | |
127384973 | variableunknown261 | C | Aug. 29, 2021, 4:44 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 3788800 | 1800 | |
127382854 | Reeman | C | Aug. 29, 2021, 4:36 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 3788800 | 1800 | |
127380729 | ildth | C | Aug. 29, 2021, 4:28 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 3788800 | 1800 | |
127393742 | future17 | C | Aug. 29, 2021, 6:03 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 10137600 | 1800 | |
127389710 | thang315 | C | Aug. 29, 2021, 5 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 11776000 | 1800 | |
127387076 | xiaowanziya | C | Aug. 29, 2021, 4:51 p.m. | OK | GNU C++17 | TESTS | 90 | 30 | 35840000 | 1800 | |
127409223 | Phoenix1369 | C | Aug. 30, 2021, 1:38 a.m. | OK | GNU C++17 | TESTS | 90 | 31 | 3686400 | 1800 | |
127409091 | Phoenix1369 | C | Aug. 30, 2021, 1:33 a.m. | OK | GNU C++17 | TESTS | 90 | 31 | 3686400 | 1800 | |
127409001 | Phoenix1369 | C | Aug. 30, 2021, 1:30 a.m. | OK | GNU C++17 | TESTS | 90 | 31 | 3686400 | 1800 | |
127408012 | MrGary | C | Aug. 30, 2021, 12:48 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 15 | 4300800 | 1800 | |
127403711 | stostap | C | Aug. 29, 2021, 9:22 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 15 | 4300800 | 1800 | |
127418049 | c_str | C | Aug. 30, 2021, 5:16 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127409665 | Rayhl | C | Aug. 30, 2021, 1:52 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127404823 | codertonk | C | Aug. 29, 2021, 10:03 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127397862 | roy.satyam | C | Aug. 29, 2021, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127395939 | jb_2402 | C | Aug. 29, 2021, 6:22 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127386949 | AfLZK | C | Aug. 29, 2021, 4:51 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127383916 | tupside | C | Aug. 29, 2021, 4:40 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127383049 | gorileo | C | Aug. 29, 2021, 4:37 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 30 | 4300800 | 1800 | |
127415310 | SavageClown007 | C | Aug. 30, 2021, 4:17 a.m. | OK | Java 11 | TESTS | 90 | 186 | 23859200 | 1800 | |
127395499 | akash132 | C | Aug. 29, 2021, 6:17 p.m. | OK | Java 11 | TESTS | 90 | 187 | 23756800 | 1800 | |
127408495 | _Body | C | Aug. 30, 2021, 1:11 a.m. | OK | Java 11 | TESTS | 90 | 187 | 23859200 | 1800 | |
127418015 | akshatj07 | C | Aug. 30, 2021, 5:16 a.m. | OK | Java 11 | TESTS | 90 | 218 | 23756800 | 1800 | |
127394370 | MubtasimShahriar | C | Aug. 29, 2021, 6:06 p.m. | OK | Java 11 | TESTS | 90 | 218 | 23859200 | 1800 | |
127418696 | _raina_ | C | Aug. 30, 2021, 5:30 a.m. | OK | Java 11 | TESTS | 90 | 234 | 24473600 | 1800 | |
127389706 | reennn | C | Aug. 29, 2021, 5 p.m. | OK | Java 11 | TESTS | 90 | 249 | 24985600 | 1800 | |
127383209 | ytripathi891 | C | Aug. 29, 2021, 4:37 p.m. | OK | Java 11 | TESTS | 90 | 264 | 23859200 | 1800 | |
127386441 | Dukkha | C | Aug. 29, 2021, 4:49 p.m. | OK | Java 11 | TESTS | 90 | 280 | 24473600 | 1800 | |
127386757 | SaberXpro | C | Aug. 29, 2021, 4:50 p.m. | OK | Java 11 | TESTS | 90 | 295 | 23859200 | 1800 | |
127401883 | Adi_7861 | C | Aug. 29, 2021, 8:23 p.m. | OK | Java 8 | TESTS | 90 | 109 | 20480000 | 1800 | |
127388694 | medude | C | Aug. 29, 2021, 4:57 p.m. | OK | Java 8 | TESTS | 90 | 139 | 20377600 | 1800 | |
127418304 | navjot1234 | C | Aug. 30, 2021, 5:21 a.m. | OK | Java 8 | TESTS | 90 | 140 | 21196800 | 1800 | |
127399746 | pras7946 | C | Aug. 29, 2021, 7:29 p.m. | OK | Java 8 | TESTS | 90 | 140 | 21196800 | 1800 | |
127390724 | GoldenShadow | C | Aug. 29, 2021, 5:02 p.m. | OK | Java 8 | TESTS | 90 | 155 | 20377600 | 1800 | |
127389397 | Restricted | C | Aug. 29, 2021, 4:59 p.m. | OK | Java 8 | TESTS | 90 | 155 | 20377600 | 1800 | |
127389011 | kkkkush | C | Aug. 29, 2021, 4:58 p.m. | OK | Java 8 | TESTS | 90 | 171 | 20377600 | 1800 | |
127390571 | gautam.abhinav36 | C | Aug. 29, 2021, 5:02 p.m. | OK | Java 8 | TESTS | 90 | 234 | 21196800 | 1800 | |
127389200 | pallav12 | C | Aug. 29, 2021, 4:58 p.m. | OK | Kotlin | TESTS | 90 | 171 | 21708800 | 1800 | |
127416309 | adasanvin12345 | C | Aug. 30, 2021, 4:40 a.m. | OK | MS C++ 2017 | TESTS | 90 | 31 | 3788800 | 1800 | |
127406869 | FLself | C | Aug. 29, 2021, 11:50 p.m. | OK | MS C++ 2017 | TESTS | 90 | 31 | 3788800 | 1800 | |
127406818 | FLself | C | Aug. 29, 2021, 11:47 p.m. | OK | MS C++ 2017 | TESTS | 90 | 31 | 3788800 | 1800 | |
127395695 | FSTForces | C | Aug. 29, 2021, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 90 | 31 | 3788800 | 1800 | |
127389903 | cepiloth | C | Aug. 29, 2021, 5 p.m. | OK | MS C++ 2017 | TESTS | 90 | 31 | 3788800 | 1800 | |
127384357 | P___ | C | Aug. 29, 2021, 4:41 p.m. | OK | MS C++ 2017 | TESTS | 90 | 46 | 3788800 | 1800 | |
127405298 | 30SK5 | C | Aug. 29, 2021, 10:25 p.m. | OK | MS C++ 2017 | TESTS | 90 | 124 | 3788800 | 1800 | |
127387309 | psn2706 | C | Aug. 29, 2021, 4:52 p.m. | OK | MS C++ 2017 | TESTS | 90 | 139 | 75878400 | 1800 | |
127411552 | guanghechen | C | Aug. 30, 2021, 2:47 a.m. | OK | Node.js | TESTS | 90 | 62 | 28979200 | 1800 | |
127411710 | guanghechen | C | Aug. 30, 2021, 2:51 a.m. | OK | Node.js | TESTS | 90 | 77 | 28979200 | 1800 | |
127411205 | guanghechen | C | Aug. 30, 2021, 2:39 a.m. | OK | Node.js | TESTS | 90 | 77 | 28979200 | 1800 | |
127410660 | guanghechen | C | Aug. 30, 2021, 2:24 a.m. | OK | Node.js | TESTS | 90 | 109 | 28979200 | 1800 | |
127394949 | queme | C | Aug. 29, 2021, 6:11 p.m. | OK | PyPy 3 | TESTS | 90 | 109 | 20172800 | 1800 | |
127387269 | Queme2 | C | Aug. 29, 2021, 4:52 p.m. | OK | PyPy 3 | TESTS | 90 | 109 | 20172800 | 1800 | |
127403723 | Aksnov | C | Aug. 29, 2021, 9:23 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 20172800 | 1800 | |
127393750 | legend.ary_as | C | Aug. 29, 2021, 6:03 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 22118400 | 1800 | |
127388214 | innocent_SINNER | C | Aug. 29, 2021, 4:55 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 22220800 | 1800 | |
127386843 | ilia-ivanov | C | Aug. 29, 2021, 4:50 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 22220800 | 1800 | |
127385827 | VarAmu | C | Aug. 29, 2021, 4:47 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 22220800 | 1800 | |
127382085 | Warrior7 | C | Aug. 29, 2021, 4:33 p.m. | OK | PyPy 3 | TESTS | 90 | 124 | 22528000 | 1800 | |
127380024 | AkazayaNine | C | Aug. 29, 2021, 4:26 p.m. | OK | PyPy 3 | TESTS | 90 | 139 | 20172800 | 1800 | |
127388509 | Andybar | C | Aug. 29, 2021, 4:56 p.m. | OK | PyPy 3 | TESTS | 90 | 140 | 22220800 | 1800 | |
127410403 | yonsweng | C | Aug. 30, 2021, 2:15 a.m. | OK | Python 3 | TESTS | 90 | 77 | 6963200 | 1800 | |
127381030 | Konti2 | C | Aug. 29, 2021, 4:29 p.m. | OK | Python 3 | TESTS | 90 | 124 | 6963200 | 1800 | |
127396187 | sh1194 | C | Aug. 29, 2021, 6:25 p.m. | OK | Python 3 | TESTS | 90 | 265 | 6963200 | 1800 | |
127420423 | SF-Manman | C | Aug. 30, 2021, 6 a.m. | OK | Python 3 | TESTS | 90 | 280 | 6963200 | 1800 | |
127385749 | zheland | C | Aug. 29, 2021, 4:46 p.m. | OK | Rust | TESTS | 90 | 31 | 3891200 | 1800 |
Back to search problems