Codeforces Round 551 (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
1153 Codeforces Round 551 (Div. 2) FINISHED False 7200 182274887 April 13, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7455 ) C Serval and Parenthesis Sequence PROGRAMMING greedy strings 1600

B'Serval soon said goodbye to Japari kindergarten, and began his life in Japari Primary School. In his favorite math class, the teacher taught him the following interesting definitions. A parenthesis sequence is a string, containing only characters "(" and ")". A correct parenthesis sequence is a parenthesis sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, parenthesis sequences "()()", "(())" are correct (the resulting expressions are: "(1+1)+(1+1)", "((1+1)+1)"), while ")(" and ")" are not. Note that the empty string is a correct parenthesis sequence by definition. We define that |s| as the length of string s . A strict prefix s[1 ... l] (1 <= q l< |s|) of a string s = s_1s_2 ... s_{|s|} is string s_1s_2 ... s_l . Note that the empty string and the whole string are not strict prefixes of any string by the definition. Having learned these definitions, he comes up with a new problem. He writes down a string s containing only characters "(", ")" and "?". And what he is going to do, is to replace each of the "?" in s independently by one of "(" and ")" to make all strict prefixes of the new sequence not a correct parenthesis sequence, while the new sequence should be a correct parenthesis sequence. After all, he is just a primary school student so this problem is too hard for him to solve. As his best friend, can you help him to replace the question marks? If there are many solutions, any of them is acceptable. The first line contains a single integer |s| ( 1 <= q |s| <= q 3 cdot 10^5 ), the length of the string. The second line contains a string s , containing only "(", ")" and "?". A single line contains a string representing the answer. If there are many solutions, any of them is acceptable. If there is no answer, print a single line containing ":(" (without the quotes). It can be'...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52915830 Gassa C April 17, 2019, 3:48 p.m. OK D TESTS 96 46 4198400 1600
52698190 iica C April 13, 2019, 2:50 p.m. OK D TESTS 96 46 4300800 1600
56401251 LaSWeeG C July 1, 2019, 4:57 p.m. OK Delphi TESTS 96 124 614400 1600
52795416 Denor C April 15, 2019, 8:11 p.m. OK Delphi TESTS 96 139 1843200 1600
52698765 ruban C April 13, 2019, 2:52 p.m. OK Delphi TESTS 96 140 28467200 1600
53426682 samau07012005 C April 27, 2019, 2 p.m. OK FPC TESTS 96 46 3686400 1600
52703915 PhuongPeu C April 13, 2019, 3:14 p.m. OK FPC TESTS 96 46 3891200 1600
52701562 Oompaloompa C April 13, 2019, 3:04 p.m. OK FPC TESTS 96 46 8499200 1600
52709786 TShT C April 13, 2019, 3:44 p.m. OK FPC TESTS 96 889 10444800 1600
52804308 omlgg C April 16, 2019, 2:20 a.m. OK FPC TESTS 96 904 307200 1600
52725968 d4rkn19ht C April 14, 2019, 12:21 a.m. OK FPC TESTS 96 920 200704000 1600
53469342 sansen C April 28, 2019, 11:57 a.m. OK GNU C11 TESTS 96 31 307200 1600
54148246 Alfeh C May 14, 2019, 9:02 p.m. OK GNU C11 TESTS 96 31 307200 1600
52739738 _one_noob C April 14, 2019, 8:18 a.m. OK GNU C11 TESTS 96 31 307200 1600
52713071 4c5948 C April 13, 2019, 4:01 p.m. OK GNU C11 TESTS 96 31 716800 1600
57768724 cs234_shrey C July 25, 2019, 10:35 p.m. OK GNU C11 TESTS 96 46 307200 1600
60049253 vjudge2 C Sept. 4, 2019, 10:58 p.m. OK GNU C11 TESTS 96 46 307200 1600
66190456 abcd227 C Dec. 2, 2019, 4:12 p.m. OK GNU C11 TESTS 96 46 307200 1600
52698136 EatChangmyeong C April 13, 2019, 2:49 p.m. OK GNU C11 TESTS 96 46 307200 1600
52703281 rainboy C April 13, 2019, 3:11 p.m. OK GNU C11 TESTS 96 46 307200 1600
52985458 Jakvrh1 C April 18, 2019, 6:45 p.m. OK GNU C11 TESTS 96 46 307200 1600
53079555 vjudge2 C April 21, 2019, 5:29 a.m. OK GNU C++11 TESTS 96 31 102400 1600
67475189 z7z_Eta C Dec. 23, 2019, 2:07 p.m. OK GNU C++11 TESTS 96 31 102400 1600
53225868 Theodor1000 C April 24, 2019, 2:25 p.m. OK GNU C++11 TESTS 96 31 102400 1600
53216970 lizhijian C April 24, 2019, 9:25 a.m. OK GNU C++11 TESTS 96 31 102400 1600
53818812 hjmmm C May 6, 2019, 12:05 p.m. OK GNU C++11 TESTS 96 31 102400 1600
54246940 Chirography_11 C May 16, 2019, 3:19 p.m. OK GNU C++11 TESTS 96 31 102400 1600
54955809 vjudge3 C June 1, 2019, 10:48 p.m. OK GNU C++11 TESTS 96 31 102400 1600
56056720 wucstdio C June 26, 2019, 12:50 a.m. OK GNU C++11 TESTS 96 31 102400 1600
56058719 luogu_bot5 C June 26, 2019, 3:24 a.m. OK GNU C++11 TESTS 96 31 102400 1600
62505939 vjudge1 C Oct. 13, 2019, 12:24 p.m. OK GNU C++11 TESTS 96 31 102400 1600
53273577 vjudge2 C April 25, 2019, 8 a.m. OK GNU C++14 TESTS 96 30 307200 1600
54988852 apurvmayank C June 2, 2019, 5:21 p.m. OK GNU C++14 TESTS 96 30 1024000 1600
52717706 harsh48chaturvedi C April 13, 2019, 6:07 p.m. OK GNU C++14 TESTS 96 30 80486400 1600
57481791 vjudge3 C July 22, 2019, 2:48 a.m. OK GNU C++14 TESTS 96 31 307200 1600
67289538 CrazyDiamond C Dec. 20, 2019, 3:13 p.m. OK GNU C++14 TESTS 96 31 307200 1600
62856534 lybzscyzb C Oct. 18, 2019, 9:25 a.m. OK GNU C++14 TESTS 96 31 307200 1600
62439538 inluminas C Oct. 12, 2019, 6:48 p.m. OK GNU C++14 TESTS 96 31 307200 1600
61925956 tingyu C Oct. 5, 2019, 2:38 p.m. OK GNU C++14 TESTS 96 31 307200 1600
59942291 shua_ti C Sept. 3, 2019, 11:52 a.m. OK GNU C++14 TESTS 96 31 307200 1600
59622036 HouZAJ C Aug. 28, 2019, 2:32 p.m. OK GNU C++14 TESTS 96 31 307200 1600
52952711 It_Wasnt_Me C April 18, 2019, 12:33 p.m. OK GNU C++17 TESTS 96 30 1024000 1600
56310098 DreamWeaver C June 30, 2019, 2:20 p.m. OK GNU C++17 TESTS 96 30 1024000 1600
61950832 Drift_bottle C Oct. 6, 2019, 3:18 a.m. OK GNU C++17 TESTS 96 31 307200 1600
62568493 zcx99dream C Oct. 14, 2019, 1:50 p.m. OK GNU C++17 TESTS 96 31 307200 1600
62568687 vjudge2 C Oct. 14, 2019, 1:53 p.m. OK GNU C++17 TESTS 96 31 307200 1600
62871536 OrlandoIsay C Oct. 18, 2019, 1:55 p.m. OK GNU C++17 TESTS 96 31 307200 1600
67631643 Rahul_cpp C Dec. 26, 2019, 4:25 a.m. OK GNU C++17 TESTS 96 31 307200 1600
67654862 M...... C Dec. 26, 2019, 1:32 p.m. OK GNU C++17 TESTS 96 31 307200 1600
59775171 Novel C Aug. 30, 2019, 10:18 p.m. OK GNU C++17 TESTS 96 31 307200 1600
61927891 zhangxiyuan C Oct. 5, 2019, 3:15 p.m. OK GNU C++17 TESTS 96 31 307200 1600
52799396 2008061626 C April 16, 2019, 1:21 a.m. OK Go TESTS 96 46 0 1600
52712015 Dekedro C April 13, 2019, 3:56 p.m. OK Go TESTS 96 46 716800 1600
54980926 Lancern C June 2, 2019, 1:08 p.m. OK Go TESTS 96 46 5222400 1600
58471955 sighduck C Aug. 9, 2019, 1:03 a.m. OK Go TESTS 96 62 4505600 1600
52703489 gksato C April 13, 2019, 3:12 p.m. OK Haskell TESTS 96 61 1126400 1600
63944260 very_incredible C Oct. 31, 2019, 6:23 p.m. OK Java 11 TESTS 96 265 0 1600
57817099 vjvjain0 C July 26, 2019, 8:20 p.m. OK Java 8 TESTS 96 109 0 1600
53049454 rathi062 C April 20, 2019, 1:51 p.m. OK Java 8 TESTS 96 109 0 1600
52734921 bazinga84 C April 14, 2019, 6:04 a.m. OK Java 8 TESTS 96 109 0 1600
60030990 vjudge4 C Sept. 4, 2019, 3:24 p.m. OK Java 8 TESTS 96 124 0 1600
60030775 Lark C Sept. 4, 2019, 3:21 p.m. OK Java 8 TESTS 96 124 0 1600
59576818 Washoum C Aug. 27, 2019, 2:27 p.m. OK Java 8 TESTS 96 124 0 1600
58716570 adeepgarg13 C Aug. 13, 2019, 2:17 p.m. OK Java 8 TESTS 96 124 0 1600
55176428 JCKG C June 5, 2019, 6:54 p.m. OK Java 8 TESTS 96 124 0 1600
54963891 vjudge4 C June 2, 2019, 5:24 a.m. OK Java 8 TESTS 96 124 0 1600
54573627 TheSawan C May 24, 2019, 9:14 p.m. OK Java 8 TESTS 96 124 0 1600
60383879 Spheniscine C Sept. 11, 2019, 10:38 a.m. OK Kotlin TESTS 96 124 0 1600
66206580 Tlatoani C Dec. 3, 2019, 3:33 a.m. OK Kotlin TESTS 96 186 0 1600
52715238 Bobko C April 13, 2019, 5:21 p.m. OK Kotlin TESTS 96 202 0 1600
56060425 og.kostya C June 26, 2019, 5:06 a.m. OK Mono C# TESTS 96 62 2969600 1600
52773323 omikad C April 15, 2019, 10:30 a.m. OK Mono C# TESTS 96 77 5427200 1600
52911185 camypaper C April 17, 2019, 2:10 p.m. OK Mono C# TESTS 96 77 7168000 1600
53008722 TranCongDuy C April 19, 2019, 11 a.m. OK Mono C# TESTS 96 77 7577600 1600
52909571 fr0st C April 17, 2019, 1:41 p.m. OK Mono C# TESTS 96 77 70246400 1600
52821332 Sharaf C April 16, 2019, 12:08 p.m. OK Mono C# TESTS 96 93 6553600 1600
62873928 ansergeyg C Oct. 18, 2019, 2:40 p.m. OK Mono C# TESTS 96 966 5324800 1600
52704770 kkuehner C April 13, 2019, 3:19 p.m. OK Mono C# TESTS 96 967 4096000 1600
52701816 eki C April 13, 2019, 3:05 p.m. OK Mono C# TESTS 96 982 3686400 1600
52782594 sergmel C April 15, 2019, 3:07 p.m. OK Mono C# TESTS 96 998 7577600 1600
53174405 qcwlmqy C April 23, 2019, 2:16 a.m. OK MS C++ TESTS 96 31 307200 1600
53021878 S.K C April 19, 2019, 4:53 p.m. OK MS C++ TESTS 96 31 307200 1600
52891439 vjudge2 C April 17, 2019, 8:04 a.m. OK MS C++ TESTS 96 31 307200 1600
55300947 vjudge3 C June 8, 2019, 12:01 p.m. OK MS C++ TESTS 96 31 819200 1600
52737626 Georgiy_Ulanov C April 14, 2019, 7:17 a.m. OK MS C++ TESTS 96 31 921600 1600
52713753 kou1 C April 13, 2019, 4:04 p.m. OK MS C++ TESTS 96 31 921600 1600
52741953 hyacinthusorientalis C April 14, 2019, 9:35 a.m. OK MS C++ TESTS 96 46 307200 1600
52892100 vjudge3 C April 17, 2019, 8:21 a.m. OK MS C++ TESTS 96 46 307200 1600
53838184 scorpiowf C May 7, 2019, 5:24 a.m. OK MS C++ TESTS 96 46 307200 1600
65485576 vjudge5 C Nov. 21, 2019, 1:14 p.m. OK MS C++ TESTS 96 46 512000 1600
58252059 ZSTU-2018329621261 C Aug. 4, 2019, 8:19 a.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52810159 DWAE86 C April 16, 2019, 8:05 a.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52910820 Xun_ C April 17, 2019, 2:03 p.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52747241 petko_mitkov C April 14, 2019, 12:17 p.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52730576 zcb C April 14, 2019, 3:42 a.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52713178 Ruben_tao C April 13, 2019, 4:02 p.m. OK MS C++ 2017 TESTS 96 31 307200 1600
53392102 CristianoRonaldo C April 27, 2019, 7:22 a.m. OK MS C++ 2017 TESTS 96 31 307200 1600
53704789 R99 C May 3, 2019, 12:39 p.m. OK MS C++ 2017 TESTS 96 31 307200 1600
52943437 MenOfPassion C April 18, 2019, 10:27 a.m. OK MS C++ 2017 TESTS 96 31 921600 1600
66900025 yuanyuan2048 C Dec. 15, 2019, 4:57 a.m. OK MS C++ 2017 TESTS 96 31 921600 1600
54268447 allonsy_kim C May 17, 2019, 7:25 a.m. OK PyPy 2 TESTS 96 156 10137600 1600
52756372 raj1307 C April 14, 2019, 5:14 p.m. OK PyPy 2 TESTS 96 171 9625600 1600
57477819 wolffd C July 21, 2019, 11:56 p.m. OK PyPy 2 TESTS 96 171 14336000 1600
53770215 cherry_su C May 5, 2019, 4:31 a.m. OK PyPy 2 TESTS 96 186 12902400 1600
52710731 pajenegod C April 13, 2019, 3:49 p.m. OK PyPy 2 TESTS 96 233 14028800 1600
52698131 pa.n.ik C April 13, 2019, 2:49 p.m. OK PyPy 2 TESTS 96 265 13004800 1600
59058613 romil797 C Aug. 18, 2019, 8:08 p.m. OK PyPy 3 TESTS 96 202 10649600 1600
52729234 yfo C April 14, 2019, 2:55 a.m. OK PyPy 3 TESTS 96 202 13619200 1600
52709286 nobe0716 C April 13, 2019, 3:42 p.m. OK PyPy 3 TESTS 96 202 13619200 1600
53434962 sdhd C April 27, 2019, 6:34 p.m. OK PyPy 3 TESTS 96 202 13721600 1600
52747707 dizballanze C April 14, 2019, 12:30 p.m. OK PyPy 3 TESTS 96 202 14233600 1600
52755652 11th younes38 C April 14, 2019, 4:41 p.m. OK PyPy 3 TESTS 96 202 14233600 1600
53002099 glucose C April 19, 2019, 7:41 a.m. OK PyPy 3 TESTS 96 202 15052800 1600
52709215 Pedantic C April 13, 2019, 3:41 p.m. OK PyPy 3 TESTS 96 217 13516800 1600
52702365 cgfs10000 C April 13, 2019, 3:07 p.m. OK PyPy 3 TESTS 96 217 13516800 1600
52716403 tom C April 13, 2019, 5:36 p.m. OK PyPy 3 TESTS 96 217 14336000 1600
52765263 Uranux C April 15, 2019, 2:33 a.m. OK Python 2 TESTS 96 249 6758400 1600
52739325 Skand C April 14, 2019, 8:06 a.m. OK Python 2 TESTS 96 280 2150400 1600
52719448 Helli.code C April 13, 2019, 6:58 p.m. OK Python 2 TESTS 96 312 6348800 1600
52750651 Cifko C April 14, 2019, 1:51 p.m. OK Python 2 TESTS 96 342 6144000 1600
53023226 wunder9l C April 19, 2019, 5:33 p.m. OK Python 2 TESTS 96 358 2150400 1600
59073267 soumyasarkar1998 C Aug. 19, 2019, 5:56 a.m. OK Python 2 TESTS 96 373 6963200 1600
52701289 supachai_pay C April 13, 2019, 3:03 p.m. OK Python 2 TESTS 96 374 921600 1600
52704608 tangchuanxin C April 13, 2019, 3:18 p.m. OK Python 2 TESTS 96 389 1536000 1600
53014063 gatsko C April 19, 2019, 1:23 p.m. OK Python 2 TESTS 96 389 9932800 1600
53302994 cs1g C April 25, 2019, 10:50 p.m. OK Python 3 TESTS 96 156 1433600 1600
53302981 cs1g C April 25, 2019, 10:49 p.m. OK Python 3 TESTS 96 170 1433600 1600
52705282 Strequals C April 13, 2019, 3:21 p.m. OK Python 3 TESTS 96 187 1536000 1600
52806273 FlyingBag65 C April 16, 2019, 4:53 a.m. OK Python 3 TESTS 96 218 2355200 1600
52706099 Lisanaaa C April 13, 2019, 3:25 p.m. OK Python 3 TESTS 96 218 2560000 1600
52718155 _Tachibana_Kanade_ C April 13, 2019, 6:19 p.m. OK Python 3 TESTS 96 218 9625600 1600
52923962 shsrfud C April 17, 2019, 7:22 p.m. OK Python 3 TESTS 96 233 1433600 1600
53560316 uberman C April 30, 2019, 9:05 a.m. OK Python 3 TESTS 96 233 2764800 1600
52702715 paspasuy C April 13, 2019, 3:09 p.m. OK Python 3 TESTS 96 265 2560000 1600
52716931 erickjohnross C April 13, 2019, 5:47 p.m. OK Python 3 TESTS 96 280 2355200 1600
52733282 rise3812 C April 14, 2019, 5:10 a.m. OK Ruby TESTS 96 374 30412800 1600
52697708 Leonardone C April 13, 2019, 2:48 p.m. OK Rust TESTS 96 31 1638400 1600
52750995 kobae964 C April 14, 2019, 2:01 p.m. OK Rust TESTS 96 46 3174400 1600
62562075 yakamoto C Oct. 14, 2019, 12:16 p.m. OK Scala TESTS 96 498 10956800 1600
52737534 PLUkraine C April 14, 2019, 7:13 a.m. OK Scala TESTS 96 530 18227200 1600

remove filters

Back to search problems