Codeforces Round 1000 (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
2063 Codeforces Round 1000 (Div. 2) FINISHED False 7200 38858123 Jan. 22, 2025, 12:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 924 ) F2 Counting Is Not Fun (Hard Version) PROGRAMMING combinatorics data structures dfs and similar dsu trees

This is the hard version of the problem. The difference between the versions is that in this version, the limits on (t) and (n) are bigger. You can hack only if you solved all versions of this problem. A bracket sequence is called balanced if it can be constructed by the following formal grammar. The empty sequence (\varnothing) is balanced. If the bracket sequence (A) is balanced, then (\mathtt{(}A\mathtt{)}) is also balanced. If the bracket sequences (A) and (B) are balanced, then the concatenated sequence (A B) is also balanced. For example, the sequences " (())() ", " () ", " (()(())) ", and the empty sequence are balanced, while " (() " and " (()))( " are not. Given a balanced bracket sequence (s), a pair of indices ((i,j)) ((i<j)) is called a good pair if (s_i) is ' ( ', (s_j) is ' ) ', and the two brackets are added simultaneously with respect to Rule 2 while constructing the sequence (s). For example, the sequence " (())() " has three different good pairs, which are ((1,4)), ((2,3)), and ((5,6)). One can show that any balanced bracket sequence of (2n) brackets contains exactly (n) different good pairs, and using any order of rules to construct the same bracket sequence will yield the same set of good pairs. Emily will play a bracket guessing game with John. The game is played as follows. Initially, John has a balanced bracket sequence (s) containing (n) different good pairs, which is not known to Emily. John tells Emily the value of (n) and asks Emily to guess the sequence. Throughout (n) turns, John gives Emily the following kind of clue on each turn. (l\;r): The sequence (s) contains a good pair ((l,r)). The clues that John gives Emily are pairwise distinct and do not contradict each other. At a certain point, Emily can be certain that the balanced bracket sequence satisfying the clues given so far is unique. For example, assume Emily knows tha

Tutorials

Codeforces Round 1000 (Div. 2) — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
302522257 nhho F2 Jan. 22, 2025, 10:10 p.m. OK C++17 (GCC 7-32) TESTS 31 296 24883200
302508651 errorgorn F2 Jan. 22, 2025, 7:05 p.m. OK C++17 (GCC 7-32) TESTS 31 421 33689600
302546108 cly_ss F2 Jan. 23, 2025, 4:57 a.m. OK C++17 (GCC 7-32) TESTS 31 484 59084800
302542897 Henry2 F2 Jan. 23, 2025, 4:14 a.m. OK C++17 (GCC 7-32) TESTS 31 499 48742400
302499961 McPqndq F2 Jan. 22, 2025, 6:01 p.m. OK C++17 (GCC 7-32) TESTS 31 577 19660800
302467431 sunrise524288 F2 Jan. 22, 2025, 2:57 p.m. OK C++17 (GCC 7-32) TESTS 31 687 42188800
302543051 4927618350 F2 Jan. 23, 2025, 4:17 a.m. OK C++17 (GCC 7-32) TESTS 31 749 20070400
302551688 jcelin F2 Jan. 23, 2025, 6:02 a.m. OK C++17 (GCC 7-32) TESTS 31 858 53760000
302545198 golions F2 Jan. 23, 2025, 4:46 a.m. OK C++17 (GCC 7-32) TESTS 31 968 57651200
302540772 xie_lzh F2 Jan. 23, 2025, 3:46 a.m. OK C++17 (GCC 7-32) TESTS 31 968 62566400
302534008 AEM_YNxingkong F2 Jan. 23, 2025, 2:10 a.m. OK C++20 (GCC 13-64) TESTS 31 108 21913600
302534640 NianFeng F2 Jan. 23, 2025, 2:20 a.m. OK C++20 (GCC 13-64) TESTS 31 186 22323200
302549364 enslaved F2 Jan. 23, 2025, 5:37 a.m. OK C++20 (GCC 13-64) TESTS 31 217 19353600
302509024 errorgorn F2 Jan. 22, 2025, 7:08 p.m. OK C++20 (GCC 13-64) TESTS 31 249 21708800
302477292 propane F2 Jan. 22, 2025, 3:43 p.m. OK C++20 (GCC 13-64) TESTS 31 265 14336000
302467421 Zqr123456 F2 Jan. 22, 2025, 2:57 p.m. OK C++20 (GCC 13-64) TESTS 31 265 18432000
302518290 Justinshao F2 Jan. 22, 2025, 8:57 p.m. OK C++20 (GCC 13-64) TESTS 31 296 24371200
302461070 RanRankeainie F2 Jan. 22, 2025, 2:04 p.m. OK C++20 (GCC 13-64) TESTS 31 296 26726400
302461139 3294fe8da1664ce185b6 F2 Jan. 22, 2025, 2:04 p.m. OK C++20 (GCC 13-64) TESTS 31 296 33689600
302482224 a65 F2 Jan. 22, 2025, 4:11 p.m. OK C++20 (GCC 13-64) TESTS 31 327 23347200
302541099 Mukundan314 F2 Jan. 23, 2025, 3:50 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 93 18944000
302537833 YuukiS F2 Jan. 23, 2025, 3:08 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 203 35737600
302505871 rgnerdplayer F2 Jan. 22, 2025, 6:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 31 218 25907200
302468548 ttamx F2 Jan. 22, 2025, 3:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 31 233 27136000
302538150 hhhhyf F2 Jan. 23, 2025, 3:12 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 249 12595200
302508922 errorgorn F2 Jan. 22, 2025, 7:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 31 249 21708800
302508864 errorgorn F2 Jan. 22, 2025, 7:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 31 249 21708800
302550677 VincentTrang F2 Jan. 23, 2025, 5:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 249 55808000
302527570 pyiming F2 Jan. 23, 2025, 12:19 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 250 14540800
302551553 Mukundan314 F2 Jan. 23, 2025, 6:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 31 265 7987200
302524850 rainboy F2 Jan. 22, 2025, 11:12 p.m. OK GNU C11 TESTS 31 1390 25395200
302469587 Little_Sheep_Yawn F2 Jan. 22, 2025, 3:06 p.m. OK PyPy 3-64 TESTS 31 1202 142643200

remove filters

Back to search problems