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 |
917
|
Codeforces Round 459 (Div. 1) |
FINISHED |
False |
7200 |
220289123 |
Jan. 29, 2018, 2:35 p.m. |
Problems
B"As Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, through the Christmas lights (he can turn them on and off with his mind). He can't directly tell his mom where he is, because the monster that took him to the Upside Down will know and relocate him. Thus, he came up with a puzzle to tell his mom his coordinates. His coordinates are the answer to the following problem. A string consisting only of parentheses ('(' and ')') is called a bracket sequence. Some bracket sequence are called correct bracket sequences. More formally: A string consisting of parentheses and question marks ('?') is called pretty if and only if there's a way to replace each question mark with either '(' or ')' such that the resulting string is a non-empty correct bracket sequence. Will gave his mom a string s consisting of parentheses and question marks (using Morse code through the lights) and his coordinates are the number of pairs of integers (l, xe2 x80 x89r) such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|s| and the string slsl xe2 x80 x89+ xe2 x80 x891... sr is pretty, where si is i-th character of s. Joyce doesn't know anything about bracket sequences, so she asked for your help. The first and only line of input contains string s, consisting only of characters '(', ')' and '?' (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|s| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000). Print the answer to Will's puzzle in the first and only line of output. For the first sample testcase, the pretty substrings of s are: For the second sample testcase, the pretty substrings of s are: "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
34981477 |
TheDarknessWalker |
A |
Feb. 6, 2018, 7:48 p.m. |
OK |
GNU C |
TESTS |
57 |
31 |
1843200 |
|
1900 |
34836057 |
QAQ2 |
A |
Feb. 2, 2018, 11:44 a.m. |
OK |
GNU C |
TESTS |
57 |
46 |
1843200 |
|
1900 |
34835670 |
caen |
A |
Feb. 2, 2018, 11:33 a.m. |
OK |
GNU C |
TESTS |
57 |
62 |
1843200 |
|
1900 |
34667645 |
lgkm39 |
A |
Jan. 29, 2018, 2:44 p.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
1843200 |
|
1900 |
34695982 |
HPUSDP |
A |
Jan. 30, 2018, 3:08 a.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
1843200 |
|
1900 |
34880375 |
Peterxiazhen |
A |
Feb. 3, 2018, 2:38 a.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34732020 |
vjudge4 |
A |
Jan. 31, 2018, 9:08 a.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34714354 |
vjudge4 |
A |
Jan. 30, 2018, 3:48 p.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34712513 |
fly8wo |
A |
Jan. 30, 2018, 2:42 p.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34710610 |
Delara |
A |
Jan. 30, 2018, 1:41 p.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34696634 |
savish28 |
A |
Jan. 30, 2018, 3:50 a.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
35571818 |
mxh1999 |
A |
Feb. 22, 2018, 11:42 a.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34947459 |
luogu_bot2 |
A |
Feb. 5, 2018, 2:56 p.m. |
OK |
GNU C++ |
TESTS |
57 |
31 |
2048000 |
|
1900 |
57447002 |
coderbd |
A |
July 21, 2019, 8:32 a.m. |
OK |
GNU C11 |
TESTS |
57 |
46 |
0 |
|
1900 |
34936736 |
vjudge5 |
A |
Feb. 5, 2018, 7:27 a.m. |
OK |
GNU C11 |
TESTS |
57 |
78 |
1843200 |
|
1900 |
35054900 |
Aliser |
A |
Feb. 8, 2018, 10:54 a.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34919150 |
lethanhtam1604 |
A |
Feb. 4, 2018, 9:35 a.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34735781 |
vjudge1 |
A |
Jan. 31, 2018, 11:48 a.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34708856 |
DomiKo |
A |
Jan. 30, 2018, 12:48 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34696320 |
dragonslayerintraining |
A |
Jan. 30, 2018, 3:29 a.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34687769 |
0xA28 |
A |
Jan. 29, 2018, 6:45 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34679855 |
Caproner |
A |
Jan. 29, 2018, 3:46 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
34677162 |
Barbossa |
A |
Jan. 29, 2018, 3:24 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
35458859 |
mHuman |
A |
Feb. 18, 2018, 10:59 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
35107237 |
Neumann |
A |
Feb. 9, 2018, 10:42 p.m. |
OK |
GNU C++11 |
TESTS |
57 |
31 |
2048000 |
|
1900 |
38543152 |
tenshi_kanade |
A |
May 22, 2018, 5:41 p.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
307200 |
|
1900 |
34671919 |
TadijaSebez |
A |
Jan. 29, 2018, 2:55 p.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1843200 |
|
1900 |
34675768 |
alex9801 |
A |
Jan. 29, 2018, 3:14 p.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1843200 |
|
1900 |
34968624 |
FuckKrydom |
A |
Feb. 6, 2018, 11:27 a.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1843200 |
|
1900 |
35043652 |
Just_a_jacket |
A |
Feb. 8, 2018, 4:24 a.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
34989995 |
Frozensmile |
A |
Feb. 7, 2018, 6:26 a.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
34985216 |
danielfleischman |
A |
Feb. 7, 2018, 12:57 a.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
34929629 |
LordVoldebug |
A |
Feb. 4, 2018, 7:15 p.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
35805828 |
Eagle_Owl |
A |
March 1, 2018, 8:18 a.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
35276388 |
ExcelPro |
A |
Feb. 14, 2018, 8:58 p.m. |
OK |
GNU C++14 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
36124742 |
as277575 |
A |
March 9, 2018, 5:09 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
31 |
1945600 |
|
1900 |
58664360 |
vjudge2 |
A |
Aug. 12, 2019, 12:05 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
31 |
3481600 |
|
1900 |
67036238 |
akane_psycho |
A |
Dec. 16, 2019, 5:29 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
69249107 |
ST_C |
A |
Jan. 21, 2020, 1:45 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
68203705 |
Ditya.Azrael- |
A |
Jan. 4, 2020, 4:44 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
66638788 |
JORGE_E |
A |
Dec. 11, 2019, 1:57 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
61396606 |
Amither |
A |
Sept. 28, 2019, 2:40 a.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
56860269 |
svlads |
A |
July 11, 2019, 9:30 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
54352109 |
quake0 |
A |
May 18, 2019, 3:27 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
52918776 |
SheepRanger |
A |
April 17, 2019, 4:55 p.m. |
OK |
GNU C++17 |
TESTS |
57 |
46 |
0 |
|
1900 |
35088015 |
filo |
A |
Feb. 9, 2018, 11:39 a.m. |
OK |
Go |
TESTS |
57 |
62 |
22937600 |
|
1900 |
34715376 |
kuppu |
A |
Jan. 30, 2018, 4:25 p.m. |
OK |
Java 8 |
TESTS |
57 |
156 |
20684800 |
|
1900 |
34702353 |
dalt |
A |
Jan. 30, 2018, 8:18 a.m. |
OK |
Java 8 |
TESTS |
57 |
156 |
20684800 |
|
1900 |
34689867 |
coderbond007 |
A |
Jan. 29, 2018, 8:18 p.m. |
OK |
Java 8 |
TESTS |
57 |
156 |
20684800 |
|
1900 |
34686521 |
Wavator |
A |
Jan. 29, 2018, 5:59 p.m. |
OK |
Java 8 |
TESTS |
57 |
156 |
20684800 |
|
1900 |
34725936 |
gegeda |
A |
Jan. 31, 2018, 4:10 a.m. |
OK |
Java 8 |
TESTS |
57 |
170 |
20684800 |
|
1900 |
53908051 |
zhongzh13 |
A |
May 9, 2019, 1:51 p.m. |
OK |
Java 8 |
TESTS |
57 |
171 |
0 |
|
1900 |
35140438 |
tri |
A |
Feb. 11, 2018, 1:25 a.m. |
OK |
Java 8 |
TESTS |
57 |
171 |
20684800 |
|
1900 |
34723763 |
MagentaCobra |
A |
Jan. 31, 2018, 12:56 a.m. |
OK |
Java 8 |
TESTS |
57 |
171 |
20684800 |
|
1900 |
34713791 |
Codeforce_123 |
A |
Jan. 30, 2018, 3:29 p.m. |
OK |
Java 8 |
TESTS |
57 |
171 |
20684800 |
|
1900 |
34688755 |
darnley |
A |
Jan. 29, 2018, 7:22 p.m. |
OK |
Java 8 |
TESTS |
57 |
171 |
20684800 |
|
1900 |
34675167 |
Sergey.Bankevich |
A |
Jan. 29, 2018, 3:10 p.m. |
OK |
Kotlin |
TESTS |
57 |
171 |
22016000 |
|
1900 |
34665647 |
chokudai |
A |
Jan. 29, 2018, 2:40 p.m. |
OK |
MS C# |
TESTS |
57 |
93 |
9420800 |
|
1900 |
34690312 |
nixmulta |
A |
Jan. 29, 2018, 8:44 p.m. |
OK |
MS C# |
TESTS |
57 |
108 |
9728000 |
|
1900 |
34671541 |
16silver |
A |
Jan. 29, 2018, 2:54 p.m. |
OK |
MS C++ |
TESTS |
57 |
61 |
2048000 |
|
1900 |
52063457 |
vjudge5 |
A |
March 31, 2019, 3:28 a.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
0 |
|
1900 |
36042549 |
vjudge5 |
A |
March 7, 2018, 11:51 a.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
2048000 |
|
1900 |
34717441 |
jobaer.sust |
A |
Jan. 30, 2018, 5:45 p.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
2048000 |
|
1900 |
34669527 |
Brightness |
A |
Jan. 29, 2018, 2:48 p.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
2048000 |
|
1900 |
34668210 |
RCG |
A |
Jan. 29, 2018, 2:45 p.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
2048000 |
|
1900 |
37501369 |
vjudge1 |
A |
April 21, 2018, 2:41 a.m. |
OK |
MS C++ |
TESTS |
57 |
62 |
3788800 |
|
1900 |
34919834 |
ALWAYSWANNAFLY |
A |
Feb. 4, 2018, 10:16 a.m. |
OK |
MS C++ |
TESTS |
57 |
77 |
2048000 |
|
1900 |
36044596 |
vjudge3 |
A |
March 7, 2018, 12:46 p.m. |
OK |
MS C++ |
TESTS |
57 |
77 |
2150400 |
|
1900 |
52072332 |
vjudge4 |
A |
March 31, 2019, 8:23 a.m. |
OK |
MS C++ |
TESTS |
57 |
78 |
0 |
|
1900 |
61118660 |
CtrlAlt |
A |
Sept. 23, 2019, 1:43 p.m. |
OK |
MS C++ 2017 |
TESTS |
57 |
124 |
50278400 |
|
1900 |
34985249 |
masonsbro |
A |
Feb. 7, 2018, 1 a.m. |
OK |
PyPy 2 |
TESTS |
57 |
358 |
22835200 |
|
1900 |
37036600 |
nealzane |
A |
April 7, 2018, 4:27 a.m. |
OK |
PyPy 2 |
TESTS |
57 |
358 |
24678400 |
|
1900 |
34997519 |
mpsk7492 |
A |
Feb. 7, 2018, 12:11 p.m. |
OK |
PyPy 3 |
TESTS |
57 |
171 |
20992000 |
|
1900 |
35067136 |
anjalimadhavi5c0 |
A |
Feb. 8, 2018, 5:14 p.m. |
OK |
PyPy 3 |
TESTS |
57 |
202 |
21196800 |
|
1900 |
34772586 |
Teferi |
A |
Jan. 31, 2018, 3:39 p.m. |
OK |
PyPy 3 |
TESTS |
57 |
218 |
20992000 |
|
1900 |
remove filters
Back to search problems