Hello 2019

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
1097 Hello 2019 FINISHED False 10800 190912524 Jan. 4, 2019, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8484 ) C Yuhao and a Parenthesis PROGRAMMING greedy implementation 1400

B'One day, Yuhao came across a problem about checking if some bracket sequences are correct bracket sequences. A bracket sequence is any non-empty sequence of opening and closing parentheses. A bracket sequence is called a correct bracket sequence if it 's possible to obtain a correct arithmetic expression by inserting characters "+" and "1" into this sequence. For example, the sequences "(())()", "()" and "(()(()))" are correct, while the bracket sequences ")(", "(()" and "(()))(" are not correct. Yuhao found this problem too simple for him so he decided to make the problem harder. You are given many (not necessarily correct) bracket sequences. The task is to connect some of them into ordered pairs so that each bracket sequence occurs in at most one pair and the concatenation of the bracket sequences in each pair is a correct bracket sequence. The goal is to create as many pairs as possible. This problem unfortunately turned out to be too difficult for Yuhao. Can you help him and solve it? The first line contains one integer n ( 1 <= q n <= q 10^5 ) -- the number of bracket sequences. Each of the following n lines contains one bracket sequence -- a non-empty string which consists only of characters "(" and ")". The sum of lengths of all bracket sequences in the input is at most 5 cdot 10^5 . Note that a bracket sequence may appear in the input multiple times. In this case, you can use each copy of the sequence separately. Also note that the order in which strings appear in the input doesn 't matter. Print a single integer -- the maximum number of pairs which can be made, adhering to the conditions in the statement. In the first example, it 's optimal to construct two pairs: "(( )())" and "( )". '...

Tutorials

64310

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50272078 vjudge3 C Feb. 21, 2019, 7:53 a.m. OK Clang++17 Diagnostics TESTS 73 62 4096000 1400
47949836 Expired. C Jan. 4, 2019, 10:56 p.m. OK Clang++17 Diagnostics TESTS 73 264 10444800 1400
50215366 vjudge2 C Feb. 20, 2019, 4:06 a.m. OK Clang++17 Diagnostics TESTS 73 296 20480000 1400
48019744 gozssky C Jan. 6, 2019, 4:25 a.m. OK Clang++17 Diagnostics TESTS 73 373 16281600 1400
48019870 HCI C Jan. 6, 2019, 4:34 a.m. OK Clang++17 Diagnostics TESTS 73 374 16281600 1400
47967354 codeknight13 C Jan. 5, 2019, 12:48 p.m. OK Clang++17 Diagnostics TESTS 73 935 35532800 1400
47967473 codeknight13 C Jan. 5, 2019, 12:51 p.m. OK Clang++17 Diagnostics TESTS 73 935 37068800 1400
47944519 rating_Infi C Jan. 4, 2019, 6:52 p.m. OK Clang++17 Diagnostics TESTS 73 982 25497600 1400
47932486 ruban C Jan. 4, 2019, 4:16 p.m. OK Delphi TESTS 73 140 167628800 1400
47930784 TieuLang C Jan. 4, 2019, 4:06 p.m. OK FPC TESTS 73 62 2150400 1400
47934641 NewbieMisis C Jan. 4, 2019, 4:30 p.m. OK FPC TESTS 73 62 5939200 1400
47938560 khoa101003 C Jan. 4, 2019, 5 p.m. OK FPC TESTS 73 78 8806400 1400
47952482 nguyendinhthienhuy C Jan. 5, 2019, 2:53 a.m. OK FPC TESTS 73 93 8294400 1400
48319721 binarmo C Jan. 13, 2019, 8:34 a.m. OK FPC TESTS 73 124 7168000 1400
47950756 Bramble C Jan. 5, 2019, 12:34 a.m. OK GNU C11 TESTS 73 31 4915200 1400
47946969 VivekNannaka C Jan. 4, 2019, 8:03 p.m. OK GNU C11 TESTS 73 46 1331200 1400
49235763 balasiva C Jan. 31, 2019, 7:55 a.m. OK GNU C11 TESTS 73 46 4505600 1400
62335840 kaiboy C Oct. 11, 2019, 1:05 a.m. OK GNU C11 TESTS 73 46 4505600 1400
47931849 pyqjw C Jan. 4, 2019, 4:12 p.m. OK GNU C11 TESTS 73 46 4505600 1400
47969952 seedkin C Jan. 5, 2019, 2:06 p.m. OK GNU C11 TESTS 73 46 5017600 1400
47938134 DanielixS C Jan. 4, 2019, 4:57 p.m. OK GNU C11 TESTS 73 46 5427200 1400
47931479 akshat_goyal C Jan. 4, 2019, 4:09 p.m. OK GNU C11 TESTS 73 62 5017600 1400
49693678 geeyiiz C Feb. 10, 2019, 12:38 p.m. OK GNU C11 TESTS 73 78 1638400 1400
47958415 shubhamsanglikar C Jan. 5, 2019, 7:51 a.m. OK GNU C11 TESTS 73 483 4505600 1400
47950914 _Dispwnl C Jan. 5, 2019, 12:49 a.m. OK GNU C++11 TESTS 73 31 512000 1400
47952467 diegoximenes C Jan. 5, 2019, 2:52 a.m. OK GNU C++11 TESTS 73 31 512000 1400
68056634 yuzhechuan C Jan. 1, 2020, 11:31 p.m. OK GNU C++11 TESTS 73 31 512000 1400
47952415 boluotou C Jan. 5, 2019, 2:48 a.m. OK GNU C++11 TESTS 73 31 819200 1400
51348576 vjudge1 C March 15, 2019, 7:58 p.m. OK GNU C++11 TESTS 73 31 1024000 1400
48100478 ml8 C Jan. 8, 2019, 8:10 p.m. OK GNU C++11 TESTS 73 31 1024000 1400
48202969 HuaJun C Jan. 11, 2019, 6:56 a.m. OK GNU C++11 TESTS 73 31 1024000 1400
67675806 Capricornmean C Dec. 27, 2019, 1:30 a.m. OK GNU C++11 TESTS 73 31 1024000 1400
59587522 duality C Aug. 27, 2019, 6:40 p.m. OK GNU C++11 TESTS 73 31 2355200 1400
48374615 vjudge3 C Jan. 14, 2019, 6:52 a.m. OK GNU C++11 TESTS 73 31 2560000 1400
47944803 ridam C Jan. 4, 2019, 6:57 p.m. OK GNU C++14 TESTS 73 31 614400 1400
47945954 utsumi C Jan. 4, 2019, 7:28 p.m. OK GNU C++14 TESTS 73 31 614400 1400
48116169 iscsi C Jan. 9, 2019, 12:54 p.m. OK GNU C++14 TESTS 73 31 614400 1400
66507407 darkknighht1 C Dec. 8, 2019, 2:58 p.m. OK GNU C++14 TESTS 73 31 1024000 1400
69550323 ngvan1612 C Jan. 26, 2020, 6:07 a.m. OK GNU C++14 TESTS 73 31 1024000 1400
68979840 genotepic C Jan. 17, 2020, 10:17 a.m. OK GNU C++14 TESTS 73 31 1024000 1400
59856484 999KPlusONE C Sept. 1, 2019, 1:45 p.m. OK GNU C++14 TESTS 73 31 1024000 1400
59111295 vikas_404 C Aug. 19, 2019, 8:57 p.m. OK GNU C++14 TESTS 73 31 1024000 1400
49356299 rid.dle C Feb. 2, 2019, 11:14 a.m. OK GNU C++14 TESTS 73 31 1024000 1400
48324308 rareone0602 C Jan. 13, 2019, 11 a.m. OK GNU C++14 TESTS 73 31 1024000 1400
47959000 ss1h2a3tw C Jan. 5, 2019, 8:14 a.m. OK GNU C++17 TESTS 73 31 921600 1400
47968502 twothreethreethree C Jan. 5, 2019, 1:20 p.m. OK GNU C++17 TESTS 73 31 921600 1400
60161542 ikolcov C Sept. 6, 2019, 9:11 a.m. OK GNU C++17 TESTS 73 31 1024000 1400
60578621 matus C Sept. 14, 2019, 5:32 p.m. OK GNU C++17 TESTS 73 31 1024000 1400
67396844 zeddie C Dec. 22, 2019, 12:04 a.m. OK GNU C++17 TESTS 73 31 1024000 1400
68017196 KKT_89 C Dec. 31, 2019, 7:27 p.m. OK GNU C++17 TESTS 73 31 1024000 1400
68070661 Mip182 C Jan. 2, 2020, 10:08 a.m. OK GNU C++17 TESTS 73 31 1024000 1400
68944932 sravyaprathapani C Jan. 16, 2020, 3:47 p.m. OK GNU C++17 TESTS 73 31 1024000 1400
55830702 aayush_bhat1999 C June 20, 2019, 1 p.m. OK GNU C++17 TESTS 73 31 1024000 1400
49951288 sharvin2187 C Feb. 15, 2019, 2:07 p.m. OK GNU C++17 TESTS 73 31 1024000 1400
47934684 mixnuts C Jan. 4, 2019, 4:30 p.m. OK Go TESTS 73 77 716800 1400
47951992 davidguandev C Jan. 5, 2019, 2:16 a.m. OK Go TESTS 73 78 5222400 1400
58346717 sighduck C Aug. 5, 2019, 3:19 p.m. OK Go TESTS 73 93 4505600 1400
68097308 MaxHeap C Jan. 2, 2020, 9:54 p.m. OK Java 11 TESTS 73 187 0 1400
68040123 cribabby C Jan. 1, 2020, 1:55 p.m. OK Java 11 TESTS 73 311 3481600 1400
48584231 revanthreddy85 C Jan. 19, 2019, 6:29 p.m. OK Java 8 TESTS 73 124 0 1400
58556628 Java C Aug. 11, 2019, 2:22 a.m. OK Java 8 TESTS 73 124 0 1400
48520172 sooraj10 C Jan. 18, 2019, 6:20 a.m. OK Java 8 TESTS 73 124 0 1400
48089499 myaw C Jan. 8, 2019, 1:02 p.m. OK Java 8 TESTS 73 124 0 1400
47973531 Ziklon C Jan. 5, 2019, 4:21 p.m. OK Java 8 TESTS 73 124 0 1400
47954882 alibaba C Jan. 5, 2019, 5:18 a.m. OK Java 8 TESTS 73 124 0 1400
47950768 prituladima C Jan. 5, 2019, 12:35 a.m. OK Java 8 TESTS 73 124 0 1400
47945028 ShowStopper728 C Jan. 4, 2019, 7:02 p.m. OK Java 8 TESTS 73 124 0 1400
47944367 Ahmed_Diab C Jan. 4, 2019, 6:50 p.m. OK Java 8 TESTS 73 124 0 1400
47941037 Instynkt C Jan. 4, 2019, 5:23 p.m. OK Java 8 TESTS 73 124 0 1400
56036733 Spheniscine C June 25, 2019, 12:26 p.m. OK Kotlin TESTS 73 202 0 1400
47948688 spookywooky C Jan. 4, 2019, 9:32 p.m. OK Kotlin TESTS 73 233 0 1400
47949246 StudyApps C Jan. 4, 2019, 10:04 p.m. OK Mono C# TESTS 73 62 3481600 1400
47945185 SegaMegaDrive C Jan. 4, 2019, 7:06 p.m. OK Mono C# TESTS 73 78 5734400 1400
47928798 ykurmangaliyev C Jan. 4, 2019, 3:55 p.m. OK Mono C# TESTS 73 93 6758400 1400
55126845 og.kostya C June 5, 2019, 1:14 p.m. OK Mono C# TESTS 73 93 8192000 1400
50982313 nemars C March 7, 2019, 6:14 p.m. OK Mono C# TESTS 73 108 8192000 1400
47942093 keymoon C Jan. 4, 2019, 5:32 p.m. OK Mono C# TESTS 73 109 10752000 1400
47952844 teru C Jan. 5, 2019, 3:17 a.m. OK Mono C# TESTS 73 109 13721600 1400
47939389 Manchi_6701 C Jan. 4, 2019, 5:08 p.m. OK Mono C# TESTS 73 124 7577600 1400
48983125 XDKalia C Jan. 26, 2019, 11:12 a.m. OK MS C++ TESTS 73 31 5017600 1400
50591004 _PortgasD.Ace_ C Feb. 28, 2019, 7:26 a.m. OK MS C++ TESTS 73 46 921600 1400
50090713 vjudge2 C Feb. 18, 2019, 10:11 a.m. OK MS C++ TESTS 73 46 1331200 1400
48778340 vjudge4 C Jan. 23, 2019, 5:38 a.m. OK MS C++ TESTS 73 46 1536000 1400
48373139 vjudge4 C Jan. 14, 2019, 5:58 a.m. OK MS C++ TESTS 73 46 3379200 1400
48022852 sxweetlollipop2912 C Jan. 6, 2019, 7:03 a.m. OK MS C++ TESTS 73 46 3379200 1400
58857033 vjudge4 C Aug. 15, 2019, 9:46 a.m. OK MS C++ TESTS 73 46 4505600 1400
58381674 vjudge2 C Aug. 6, 2019, 10:16 a.m. OK MS C++ TESTS 73 46 4505600 1400
50517204 wjfwjfwjf C Feb. 26, 2019, 7:15 a.m. OK MS C++ TESTS 73 46 4505600 1400
50437494 vjudge3 C Feb. 24, 2019, 3:45 p.m. OK MS C++ TESTS 73 46 4505600 1400
53665965 2018qwer C May 2, 2019, 10:25 a.m. OK MS C++ 2017 TESTS 73 62 5324800 1400
54176805 DODIK_228 C May 15, 2019, 2:11 p.m. OK MS C++ 2017 TESTS 73 62 5324800 1400
50903629 Kosmonaft C March 6, 2019, 6:42 p.m. OK MS C++ 2017 TESTS 73 77 6348800 1400
48939532 Still_Theory C Jan. 25, 2019, 3:50 p.m. OK MS C++ 2017 TESTS 73 77 6451200 1400
57357825 ___sss C July 20, 2019, 6:52 a.m. OK MS C++ 2017 TESTS 73 78 1843200 1400
47945690 sk0 C Jan. 4, 2019, 7:19 p.m. OK Ocaml TESTS 73 46 11059200 1400
47944773 sk0 C Jan. 4, 2019, 6:56 p.m. OK Ocaml TESTS 73 92 9011200 1400
50609892 Stanislav666 C Feb. 28, 2019, 4:22 p.m. OK PascalABC.NET TESTS 73 218 1945600 1400
47936441 Lososus C Jan. 4, 2019, 4:44 p.m. OK PascalABC.NET TESTS 73 529 3174400 1400
47958414 mayakin C Jan. 5, 2019, 7:51 a.m. OK PHP TESTS 73 108 512000 1400
47934754 iv.shlykov C Jan. 4, 2019, 4:31 p.m. OK PHP TESTS 73 140 26828800 1400
54781315 raj1307 C May 28, 2019, 10:09 p.m. OK PyPy 2 TESTS 73 171 10854400 1400
47950713 wartortle C Jan. 5, 2019, 12:30 a.m. OK PyPy 2 TESTS 73 639 2764800 1400
47960784 aniket11 C Jan. 5, 2019, 9:11 a.m. OK PyPy 2 TESTS 73 655 15360000 1400
47931564 wangkan2001 C Jan. 4, 2019, 4:10 p.m. OK PyPy 2 TESTS 73 670 4198400 1400
50648483 gatsko C March 1, 2019, 4:40 p.m. OK PyPy 2 TESTS 73 670 10240000 1400
47973066 adshin21 C Jan. 5, 2019, 4:02 p.m. OK PyPy 2 TESTS 73 701 2662400 1400
47942686 seva_b C Jan. 4, 2019, 5:38 p.m. OK PyPy 2 TESTS 73 733 15155200 1400
47940415 xyaa C Jan. 4, 2019, 5:17 p.m. OK PyPy 2 TESTS 73 888 21094400 1400
47933856 abhishekbhr C Jan. 4, 2019, 4:25 p.m. OK PyPy 3 TESTS 73 187 5017600 1400
47973453 adshin21 C Jan. 5, 2019, 4:18 p.m. OK PyPy 3 TESTS 73 218 5017600 1400
47959261 Mr.Inconsistent C Jan. 5, 2019, 8:24 a.m. OK PyPy 3 TESTS 73 280 8806400 1400
47934893 dodge2 C Jan. 4, 2019, 4:32 p.m. OK PyPy 3 TESTS 73 280 13926400 1400
62081028 FireBird23 C Oct. 7, 2019, 8:44 p.m. OK PyPy 3 TESTS 73 312 16896000 1400
48582475 tymo C Jan. 19, 2019, 5:22 p.m. OK PyPy 3 TESTS 73 326 10035200 1400
47941538 Coki628 C Jan. 4, 2019, 5:27 p.m. OK PyPy 3 TESTS 73 326 22732800 1400
48582308 tymo C Jan. 19, 2019, 5:16 p.m. OK PyPy 3 TESTS 73 343 10035200 1400
68330630 nealzane C Jan. 6, 2020, 6:38 p.m. OK PyPy 3 TESTS 73 795 9011200 1400
47958229 lmm333 C Jan. 5, 2019, 7:44 a.m. OK PyPy 3 TESTS 73 810 6246400 1400
47973046 adshin21 C Jan. 5, 2019, 4:01 p.m. OK Python 2 TESTS 73 327 1433600 1400
47946397 Neil C Jan. 4, 2019, 7:42 p.m. OK Python 2 TESTS 73 358 1638400 1400
47942862 saladtoes1 C Jan. 4, 2019, 5:39 p.m. OK Python 2 TESTS 73 373 6451200 1400
51700631 gaidash C March 22, 2019, 3:45 p.m. OK Python 2 TESTS 73 483 5427200 1400
47956387 arkham_knight_ C Jan. 5, 2019, 6:26 a.m. OK Python 2 TESTS 73 514 18124800 1400
47940680 scambret C Jan. 4, 2019, 5:20 p.m. OK Python 2 TESTS 73 545 4505600 1400
48513873 Wizmann C Jan. 18, 2019, 1:44 a.m. OK Python 2 TESTS 73 607 6041600 1400
47934811 alessandrosolbiati C Jan. 4, 2019, 4:31 p.m. OK Python 2 TESTS 73 608 4710400 1400
47929617 SoSooding C Jan. 4, 2019, 3:59 p.m. OK Python 2 TESTS 73 638 24883200 1400
47933363 wolffd C Jan. 4, 2019, 4:21 p.m. OK Python 2 TESTS 73 639 8908800 1400
47973486 adshin21 C Jan. 5, 2019, 4:19 p.m. OK Python 3 TESTS 73 265 1843200 1400
47935546 nani_7 C Jan. 4, 2019, 4:37 p.m. OK Python 3 TESTS 73 312 1843200 1400
47972932 adshin21 C Jan. 5, 2019, 3:58 p.m. OK Python 3 TESTS 73 327 1843200 1400
48045601 Coki628 C Jan. 7, 2019, 2:22 a.m. OK Python 3 TESTS 73 327 1945600 1400
47934825 bober86 C Jan. 4, 2019, 4:31 p.m. OK Python 3 TESTS 73 342 1843200 1400
48131322 online6731 C Jan. 9, 2019, 3:11 p.m. OK Python 3 TESTS 73 342 4403200 1400
47961351 Seyed_Seyed C Jan. 5, 2019, 9:29 a.m. OK Python 3 TESTS 73 342 5120000 1400
47931534 ZeDRoman C Jan. 4, 2019, 4:10 p.m. OK Python 3 TESTS 73 343 1843200 1400
50166507 thelegendofepubgg C Feb. 19, 2019, 2:28 p.m. OK Python 3 TESTS 73 358 1843200 1400
47930225 amirah C Jan. 4, 2019, 4:03 p.m. OK Python 3 TESTS 73 358 5120000 1400
47959075 Jumnast C Jan. 5, 2019, 8:17 a.m. OK Ruby TESTS 73 358 17408000 1400
47968669 koprus77 C Jan. 5, 2019, 1:25 p.m. OK Ruby TESTS 73 483 53248000 1400
48387363 corvvs_ C Jan. 14, 2019, 1:43 p.m. OK Ruby TESTS 73 654 99942400 1400
47972452 shyking C Jan. 5, 2019, 3:39 p.m. OK Ruby TESTS 73 748 97280000 1400
47965490 brauliobz C Jan. 5, 2019, 11:55 a.m. OK Rust TESTS 73 62 2969600 1400
47945666 Bassel C Jan. 4, 2019, 7:19 p.m. OK Rust TESTS 73 77 1433600 1400
47940837 Dx18 C Jan. 4, 2019, 5:21 p.m. OK Rust TESTS 73 78 3993600 1400
47944992 Letmecry C Jan. 4, 2019, 7:01 p.m. OK Rust TESTS 73 109 1024000 1400
47932186 yakamoto C Jan. 4, 2019, 4:14 p.m. OK Scala TESTS 73 670 20172800 1400

remove filters

Back to search problems