Good Bye 2022: 2023 is NEAR

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
1770 Good Bye 2022: 2023 is NEAR FINISHED False 9000 59412299 Dec. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 159 ) G Koxia and Bracket PROGRAMMING divide and conquer fft math

B'Chiyuu has a bracket sequence ^ dagger s of length n . Let k be the minimum number of characters that Chiyuu has to remove from s to make s balanced ^ ddagger . Now, Koxia wants you to count the number of ways to remove k characters from s so that s becomes balanced, modulo 998 ,244 ,353 . Note that two ways of removing characters are considered distinct if and only if the set of indices removed is different. ^ dagger A bracket sequence is a string containing only the characters "(" and ")". ^ ddagger A bracket sequence is called balanced if one can turn it into a valid math expression by adding characters + and 1. For example, sequences (())(), (), (()(())) and the empty string are balanced, while )(, ((), and (()))( are not. The first line of input contains a string s ( 1 <= q |s| <= q 5 cdot {10}^5 ) -- the bracket sequence. It is guaranteed that s only contains the characters "(" and ")". Output a single integer -- the number of ways to remove k characters from s so that s becomes balanced, modulo 998 ,244 ,353 . In the first test case, it can be proved that the minimum number of characters that Chiyuu has to remove is 2 . There are 4 ways to remove 2 characters to make s balanced as follows. Deleted characters are noted as red. In the second test case, the only way to make s balanced is by deleting the only character to get an empty bracket sequence, which is considered balanced. '...

Tutorials

Good Bye 2022 -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
187378521 hos.lyric G Dec. 30, 2022, 6:31 p.m. OK GNU C++17 TESTS 34 1934 45568000
187426748 IsraelWinningIOI2023 G Dec. 31, 2022, 9:02 a.m. OK GNU C++17 (64) TESTS 34 1232 46387200
187453168 farhanLabib2537 G Dec. 31, 2022, 2:05 p.m. OK GNU C++17 (64) TESTS 34 1341 50278400
187463643 rainboy G Dec. 31, 2022, 4:11 p.m. OK GNU C++17 (64) TESTS 34 2714 68096000
187404479 huangxiaohua G Dec. 31, 2022, 4:21 a.m. OK GNU C++17 (64) TESTS 34 2963 32563200
187398999 huangxiaohua G Dec. 31, 2022, 2:12 a.m. OK GNU C++17 (64) TESTS 34 3276 32563200
187455591 luogu_bot1 G Dec. 31, 2022, 2:35 p.m. OK GNU C++17 (64) TESTS 34 3697 175718400
187455363 qiuzx G Dec. 31, 2022, 2:32 p.m. OK GNU C++17 (64) TESTS 34 3712 175718400
187413715 Mr_Eight G Dec. 31, 2022, 6:34 a.m. OK GNU C++17 (64) TESTS 34 3915 80588800
187448304 ZOORO G Dec. 31, 2022, 1:10 p.m. OK GNU C++20 (64) TESTS 34 1044 109568000
187418614 noimi G Dec. 31, 2022, 7:24 a.m. OK GNU C++20 (64) TESTS 34 1107 108441600
187477244 A_G G Dec. 31, 2022, 7:20 p.m. OK GNU C++20 (64) TESTS 34 1653 14643200
187381420 ugly2333 G Dec. 30, 2022, 7 p.m. OK GNU C++20 (64) TESTS 34 2152 67072000
187463680 rainboy G Dec. 31, 2022, 4:12 p.m. OK GNU C++20 (64) TESTS 34 2729 68096000
187415219 bkifhr10 G Dec. 31, 2022, 6:48 a.m. OK GNU C++20 (64) TESTS 34 2807 95539200
187414562 njwrz G Dec. 31, 2022, 6:42 a.m. OK GNU C++20 (64) TESTS 34 2947 95539200
187475760 mdshadesh G Dec. 31, 2022, 6:51 p.m. OK GNU C++20 (64) TESTS 34 3368 48435200
187457928 dark_bird G Dec. 31, 2022, 3:03 p.m. OK GNU C++20 (64) TESTS 34 3400 48435200
187491825 yyyz04 G Jan. 1, 2023, 4:07 a.m. OK GNU C++20 (64) TESTS 34 3415 51507200

remove filters

Back to search problems