Codeforces Global Round 17

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
1610 Codeforces Global Round 17 FINISHED False 10800 99588263 Nov. 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 494 ) G AmShZ Wins a Bet PROGRAMMING data structures hashing

B'Right before the UEFA Euro 2020, AmShZ and Safar placed bets on who 'd be the champion, AmShZ betting on Italy, and Safar betting on France. Of course, AmShZ won. Hence, Safar gave him a bracket sequence S . Note that a bracket sequence is a string made of '( ' and ') ' characters. AmShZ can perform the following operation any number of times: For example, if S = "))((" and AmShZ cuts it into A = "", B = "))", and C = "((", He will obtain S = "()))((" as a new string. After performing some (possibly none) operations, AmShZ gives his string to Keshi and asks him to find the initial string. Of course, Keshi might be able to come up with more than one possible initial string. Keshi is interested in finding the lexicographically smallest possible initial string. Your task is to help Keshi in achieving his goal. A string a is lexicographically smaller than a string b if and only if one of the following holds: The only line of input contains a single string S -- the string after the operations (1 <= |S| <= 3 cdot 10^5) . It is guaranteed that the first character of S is ') '. Print the lexicographically smallest possible initial string before operations. In the first sample, you can transform ")((())))" into ")(()(())))" by splitting it into ")(", empty string, and "(())))". It can be shown that this is the lexicographically smallest possible initial string '...

Tutorials

Codeforces Global Round 17 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
136667500 Radewoosh G Nov. 23, 2021, 4:29 p.m. OK GNU C++14 TESTS 45 529 188825600
136680028 djq_cpp G Nov. 23, 2021, 5:49 p.m. OK GNU C++17 TESTS 45 62 11673600
136661048 muratt G Nov. 23, 2021, 4:02 p.m. OK GNU C++17 TESTS 45 233 143155200
136671056 inaFSTream G Nov. 23, 2021, 4:47 p.m. OK GNU C++17 TESTS 45 966 249856000
136681345 Biden G Nov. 23, 2021, 6 p.m. OK GNU C++17 TESTS 45 982 37273600
136678450 lumibons G Nov. 23, 2021, 5:31 p.m. OK GNU C++17 (64) TESTS 45 31 2252800
136674351 Rafbill G Nov. 23, 2021, 5:06 p.m. OK GNU C++17 (64) TESTS 45 46 4710400
136673664 errorgorn G Nov. 23, 2021, 5:02 p.m. OK GNU C++17 (64) TESTS 45 62 1536000
136671686 ainta G Nov. 23, 2021, 4:51 p.m. OK GNU C++17 (64) TESTS 45 62 13721600
136674061 Petr G Nov. 23, 2021, 5:04 p.m. OK GNU C++17 (64) TESTS 45 171 14540800
136677109 maroonrk G Nov. 23, 2021, 5:23 p.m. OK GNU C++17 (64) TESTS 45 233 216268800
136664868 ksun48 G Nov. 23, 2021, 4:17 p.m. OK GNU C++17 (64) TESTS 45 436 155443200
136684577 jiangly G Nov. 23, 2021, 6:44 p.m. OK GNU C++20 (64) TESTS 45 15 6963200
136699983 Alan233 G Nov. 24, 2021, 3:05 a.m. OK GNU C++20 (64) TESTS 45 139 54374400
136665673 Ormlis G Nov. 23, 2021, 4:21 p.m. OK GNU C++20 (64) TESTS 45 249 98816000

remove filters

Back to search problems