Codeforces Round 594 (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
1248 Codeforces Round 594 (Div. 2) FINISHED False 7200 160260899 Oct. 20, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2401 ) D1 The World Is Just a Programming Task (Easy Version) PROGRAMMING brute force dp greedy implementation 1900

B'This is an easier version of the problem. In this version, n <= 500 . Vasya is an experienced developer of programming competitions ' problems. As all great minds at some time, Vasya faced a creative crisis. To improve the situation, Petya gifted him a string consisting of opening and closing brackets only. Petya believes, that the beauty of the bracket string is a number of its cyclical shifts, which form a correct bracket sequence. To digress from his problems, Vasya decided to select two positions of the string (not necessarily distinct) and swap characters located at this positions with each other. Vasya will apply this operation exactly once. He is curious what is the maximum possible beauty he can achieve this way. Please help him. We remind that bracket sequence s is called correct if: For example, "(()())", "()" are correct, while ")(" and "())" are not. The cyclical shift of the string s of length n by k ( 0 <= q k < n ) is a string formed by a concatenation of the last k symbols of the string s with the first n - k symbols of string s . For example, the cyclical shift of string "(())()" by 2 equals "()(())". Cyclical shifts i and j are considered different, if i ne j . The first line contains an integer n ( 1 <= n <= 500 ), the length of the string. The second line contains a string, consisting of exactly n characters, where each of the characters is either "(" or ")". The first line should contain a single integer -- the largest beauty of the string, which can be achieved by swapping some two characters. The second line should contain integers l and r ( 1 <= q l, r <= q n ) -- the indices of two characters, which should be swapped in order to maximize the string 's beauty. In case there are several possible swaps, print any of them. In the first example, we can swap 7 -th and 8 -th character, obtaining a string "()()()('...

Tutorials

Editorial of Codeforces Round #594 (on the problems of Moscow Team Olympiad)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62996489 daut-dlang D1 Oct. 20, 2019, 10:07 a.m. OK D TESTS 41 374 0 1900
63943723 jschr D1 Oct. 31, 2019, 6:13 p.m. OK GNU C11 TESTS 41 31 307200 1900
63748809 Byakko D1 Oct. 29, 2019, 7:26 p.m. OK GNU C++11 TESTS 41 31 0 1900
63634288 chc_1234567890 D1 Oct. 28, 2019, 7:36 a.m. OK GNU C++11 TESTS 41 31 0 1900
63514416 birka0 D1 Oct. 26, 2019, 10:41 p.m. OK GNU C++11 TESTS 41 31 0 1900
63498815 yudedako D1 Oct. 26, 2019, 4:28 p.m. OK GNU C++11 TESTS 41 31 0 1900
63294615 DigBick D1 Oct. 24, 2019, 12:39 p.m. OK GNU C++11 TESTS 41 31 0 1900
63238062 osayes D1 Oct. 23, 2019, 12:47 p.m. OK GNU C++11 TESTS 41 31 0 1900
63015818 Rynar D1 Oct. 20, 2019, 12:53 p.m. OK GNU C++11 TESTS 41 31 0 1900
63008740 akazecik D1 Oct. 20, 2019, 11:04 a.m. OK GNU C++11 TESTS 41 31 0 1900
63007765 kazak D1 Oct. 20, 2019, 11:01 a.m. OK GNU C++11 TESTS 41 31 0 1900
66290239 ekaerovets D1 Dec. 4, 2019, 9:52 p.m. OK GNU C++11 TESTS 41 31 0 1900
64541488 Rubikun D1 Nov. 8, 2019, 6:51 p.m. OK GNU C++14 TESTS 41 15 0 1900
63073964 upc132 D1 Oct. 21, 2019, 1:12 p.m. OK GNU C++14 TESTS 41 15 4198400 1900
63037492 rawnix D1 Oct. 20, 2019, 9:39 p.m. OK GNU C++14 TESTS 41 30 0 1900
63017836 kruntuid D1 Oct. 20, 2019, 1:28 p.m. OK GNU C++14 TESTS 41 30 204800 1900
64677593 KisekiPurin2019 D1 Nov. 11, 2019, 8:40 a.m. OK GNU C++14 TESTS 41 30 614400 1900
63013240 TadijaSebez D1 Oct. 20, 2019, 12:13 p.m. OK GNU C++14 TESTS 41 30 1843200 1900
63212239 gsadf D1 Oct. 23, 2019, 4:32 a.m. OK GNU C++14 TESTS 41 30 1843200 1900
63023905 liouzhou_101 D1 Oct. 20, 2019, 3:34 p.m. OK GNU C++14 TESTS 41 30 4505600 1900
65497101 NDKhoa D1 Nov. 21, 2019, 5:04 p.m. OK GNU C++14 TESTS 41 30 9728000 1900
63724338 AyAyA__ D1 Oct. 29, 2019, 12:16 p.m. OK GNU C++14 TESTS 41 30 9830400 1900
66599250 rama_pang D1 Dec. 10, 2019, 3:53 p.m. OK GNU C++17 TESTS 41 15 0 1900
63231528 Tsugiru D1 Oct. 23, 2019, 11:07 a.m. OK GNU C++17 TESTS 41 30 0 1900
63065064 zeus_orz D1 Oct. 21, 2019, 10:31 a.m. OK GNU C++17 TESTS 41 30 0 1900
63419762 lam.le1512 D1 Oct. 26, 2019, 5:59 a.m. OK GNU C++17 TESTS 41 30 0 1900
64074066 leehosu01 D1 Nov. 2, 2019, 8:19 a.m. OK GNU C++17 TESTS 41 30 204800 1900
63027631 Splashing D1 Oct. 20, 2019, 4:57 p.m. OK GNU C++17 TESTS 41 30 614400 1900
63430869 jiangly D1 Oct. 26, 2019, 9:05 a.m. OK GNU C++17 TESTS 41 30 2457600 1900
66041243 interestingLSY D1 Nov. 30, 2019, 1:36 p.m. OK GNU C++17 TESTS 41 30 5836800 1900
69427704 Psychik D1 Jan. 23, 2020, 4:19 p.m. OK GNU C++17 TESTS 41 31 0 1900
67938078 kinhosz D1 Dec. 29, 2019, 9:42 p.m. OK GNU C++17 TESTS 41 31 0 1900
63064509 z20124528 D1 Oct. 21, 2019, 10:16 a.m. OK Go TESTS 41 140 0 1900
63003641 maguroguma D1 Oct. 20, 2019, 10:43 a.m. OK Go TESTS 41 327 5324800 1900
64714017 icpc_loser D1 Nov. 11, 2019, 8:28 p.m. OK Java 8 TESTS 41 109 0 1900
64681050 Nutella3000 D1 Nov. 11, 2019, 10 a.m. OK Java 8 TESTS 41 109 0 1900
63372685 Katushechka D1 Oct. 25, 2019, 9:57 a.m. OK Java 8 TESTS 41 109 0 1900
63112362 JoelWee D1 Oct. 22, 2019, 8:01 a.m. OK Java 8 TESTS 41 109 0 1900
63004298 saurabhs1206 D1 Oct. 20, 2019, 10:46 a.m. OK Java 8 TESTS 41 124 0 1900
63002480 nikolay.v.mikhaylov D1 Oct. 20, 2019, 10:37 a.m. OK Java 8 TESTS 41 140 0 1900
63006397 aman28rwt D1 Oct. 20, 2019, 10:56 a.m. OK Java 8 TESTS 41 171 0 1900
63002213 plusplus6408 D1 Oct. 20, 2019, 10:36 a.m. OK Java 8 TESTS 41 186 0 1900
63026086 Nesrin D1 Oct. 20, 2019, 4:20 p.m. OK Java 8 TESTS 41 202 0 1900
63002402 masha239 D1 Oct. 20, 2019, 10:37 a.m. OK Java 8 TESTS 41 217 0 1900
63029115 Tlatoani D1 Oct. 20, 2019, 5:36 p.m. OK Kotlin TESTS 41 140 1126400 1900
63055492 Spheniscine D1 Oct. 21, 2019, 6:02 a.m. OK Kotlin TESTS 41 264 102400 1900
63051418 Spheniscine D1 Oct. 21, 2019, 2:48 a.m. OK Kotlin TESTS 41 389 102400 1900
63001256 omikad D1 Oct. 20, 2019, 10:31 a.m. OK Mono C# TESTS 41 171 4608000 1900
63776986 hloya D1 Oct. 30, 2019, 9:53 a.m. OK Mono C# TESTS 41 530 3174400 1900
63367298 jobties D1 Oct. 25, 2019, 8 a.m. OK Mono C# TESTS 41 826 7884800 1900
64613783 vjudge2 D1 Nov. 10, 2019, 3:28 a.m. OK MS C++ TESTS 41 31 3584000 1900
63635784 vjudge2 D1 Oct. 28, 2019, 8:12 a.m. OK MS C++ TESTS 41 202 0 1900
62990650 r57shell D1 Oct. 20, 2019, 9:41 a.m. OK MS C++ TESTS 41 265 0 1900
69647870 Gleb_Dubosarskii D1 Jan. 28, 2020, 3:02 a.m. OK MS C++ TESTS 41 421 11980800 1900
63013676 grey D1 Oct. 20, 2019, 12:19 p.m. OK MS C++ TESTS 41 670 204800 1900
63004996 ielenik D1 Oct. 20, 2019, 10:49 a.m. OK MS C++ 2017 TESTS 41 31 0 1900
63208940 Fakerone D1 Oct. 23, 2019, 2:24 a.m. OK MS C++ 2017 TESTS 41 31 1843200 1900
65509247 vjudge2 D1 Nov. 22, 2019, 2:15 a.m. OK MS C++ 2017 TESTS 41 31 2969600 1900
63659870 ChaLemon D1 Oct. 28, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 41 31 14745600 1900
63015142 gs11008 D1 Oct. 20, 2019, 12:42 p.m. OK MS C++ 2017 TESTS 41 108 819200 1900
63304639 Efrocinya D1 Oct. 24, 2019, 3:10 p.m. OK MS C++ 2017 TESTS 41 109 307200 1900
63056397 OrzzrOOrzzrO D1 Oct. 21, 2019, 6:34 a.m. OK MS C++ 2017 TESTS 41 124 0 1900
63005775 AlexanderL D1 Oct. 20, 2019, 10:53 a.m. OK MS C++ 2017 TESTS 41 124 0 1900
62994814 Honey_Badger D1 Oct. 20, 2019, 9:59 a.m. OK MS C++ 2017 TESTS 41 139 0 1900
62994337 taekop D1 Oct. 20, 2019, 9:57 a.m. OK MS C++ 2017 TESTS 41 171 0 1900
63059520 MVP D1 Oct. 21, 2019, 8:03 a.m. OK PyPy 2 TESTS 41 124 0 1900
63623706 Mevan_Niluminda D1 Oct. 28, 2019, 1:47 a.m. OK PyPy 3 TESTS 41 171 0 1900
63004761 Tschech D1 Oct. 20, 2019, 10:48 a.m. OK PyPy 3 TESTS 41 171 2355200 1900
63017261 Mohamed_Ayman D1 Oct. 20, 2019, 1:17 p.m. OK PyPy 3 TESTS 41 374 2764800 1900
62995013 timothyhorsc D1 Oct. 20, 2019, 10 a.m. OK PyPy 3 TESTS 41 374 3072000 1900
63416213 codershuvo D1 Oct. 26, 2019, 4:21 a.m. OK PyPy 3 TESTS 41 530 2662400 1900
63052743 grhkm D1 Oct. 21, 2019, 3:57 a.m. OK PyPy 3 TESTS 41 607 3072000 1900
63053879 hell_x112 D1 Oct. 21, 2019, 4:57 a.m. OK PyPy 3 TESTS 41 623 2867200 1900
63050313 nikich340 D1 Oct. 21, 2019, 1:45 a.m. OK PyPy 3 TESTS 41 623 2867200 1900
63008376 nikeshthapa255 D1 Oct. 20, 2019, 11:03 a.m. OK PyPy 3 TESTS 41 639 9523200 1900
63051632 Coki628 D1 Oct. 21, 2019, 3 a.m. OK PyPy 3 TESTS 41 655 3072000 1900
63248701 Jutun D1 Oct. 23, 2019, 3:22 p.m. OK Python 3 TESTS 41 109 307200 1900
63756314 ValenKof D1 Oct. 29, 2019, 11:45 p.m. OK Rust TESTS 41 93 0 1900
63756174 ValenKof D1 Oct. 29, 2019, 11:39 p.m. OK Rust TESTS 41 93 0 1900
63008533 cojna D1 Oct. 20, 2019, 11:03 a.m. OK Rust TESTS 41 514 204800 1900
62998262 terraformer D1 Oct. 20, 2019, 10:16 a.m. OK Rust TESTS 41 561 102400 1900

remove filters

Back to search problems