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 |
---|---|---|---|---|---|---|
1924 | Codeforces Round 921 (Div. 1) | FINISHED | False | 7200 | 25456499 | Jan. 27, 2024, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1016 ) | D | Balanced Subsequences | PROGRAMMING | combinatorics dp math |
B'A sequence of brackets is called balanced if one can turn it into a valid math expression by adding characters '+ ' and '1 '. For example, sequences '(())() ', '() ', and '(()(())) ' are balanced, while ')( ', '(() ', and '(()))( ' are not. A subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements. You are given three integers n , m and k . Find the number of sequences consisting of n '( ' and m ') ', such that the longest balanced subsequence is of length 2 cdot k . Since the answer can be large calculate it modulo 1 ,000 ,000 ,007 ( 10^9 + 7 ). Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 3 cdot 10^3 ). Description of the test cases follows. The first line of each test case contains three integers n , m and k ( 1 <= n, m, k <= 2 cdot 10^3 ) For each test case, print one integer -- the answer to the problem. For the first test case "()()", "(())" are the 2 sequences For the second test case no sequence is possible. For the third test case ")((()", ")(()(", ")()((", "())((" are the 4 sequences. '... |
Codeforces Round 921 (Div. 1, Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
243615674 | hos.lyric | D | Jan. 27, 2024, 3:40 p.m. | OK | D | TESTS | 11 | 109 | 31232000 | ||
243681282 | Potassium | D | Jan. 27, 2024, 8:59 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 102400 | ||
243673839 | Roundgod | D | Jan. 27, 2024, 7:44 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 102400 | ||
243664530 | mewmewmew | D | Jan. 27, 2024, 6:41 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 102400 | ||
243604405 | Crystally | D | Jan. 27, 2024, 3:27 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 307200 | ||
243627524 | Aidos | D | Jan. 27, 2024, 3:57 p.m. | OK | GNU C++17 | TESTS | 11 | 30 | 2457600 | ||
243694159 | DaoDaoTE | D | Jan. 28, 2024, 1:29 a.m. | OK | GNU C++17 | TESTS | 11 | 31 | 102400 | ||
243611671 | potato167 | D | Jan. 27, 2024, 3:35 p.m. | OK | GNU C++17 | TESTS | 11 | 46 | 7577600 | ||
243646520 | fengqiyuka | D | Jan. 27, 2024, 4:27 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 35328000 | ||
243627630 | Swistakk | D | Jan. 27, 2024, 3:57 p.m. | OK | GNU C++17 | TESTS | 11 | 109 | 128614400 | ||
243645403 | yokozuna57 | D | Jan. 27, 2024, 4:25 p.m. | OK | GNU C++17 | TESTS | 11 | 155 | 32153600 | ||
243654019 | chenyifanlx | D | Jan. 27, 2024, 4:41 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 0 | 102400 | ||
243629541 | hitonanode | D | Jan. 27, 2024, 4 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 0 | 102400 | ||
243615017 | Benq | D | Jan. 27, 2024, 3:40 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 0 | 102400 | ||
243700451 | enslaved | D | Jan. 28, 2024, 3:15 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 0 | ||
243695194 | talant | D | Jan. 28, 2024, 1:49 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 0 | ||
243694971 | xuanxuan001 | D | Jan. 28, 2024, 1:44 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 0 | ||
243708690 | Superposition | D | Jan. 28, 2024, 5:05 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 102400 | ||
243696380 | chappy1 | D | Jan. 28, 2024, 2:10 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 102400 | ||
243646787 | nok0 | D | Jan. 27, 2024, 4:28 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 102400 | ||
243620601 | yzz162534 | D | Jan. 27, 2024, 3:47 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 102400 | ||
243688307 | ivn1k | D | Jan. 27, 2024, 10:56 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 0 | ||
243700850 | Tobo | D | Jan. 28, 2024, 3:21 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 102400 | ||
243695845 | Tricopter | D | Jan. 28, 2024, 2:01 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 102400 | ||
243676528 | innocentkitten | D | Jan. 27, 2024, 8:08 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 102400 | ||
243647496 | A_G | D | Jan. 27, 2024, 4:29 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 102400 | ||
243697941 | bachbeo2007 | D | Jan. 28, 2024, 2:35 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 0 | 4812800 | ||
243692976 | BARBARIANNNNN | D | Jan. 28, 2024, 1 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 15 | 0 | ||
243642062 | Qiulyqwq | D | Jan. 27, 2024, 4:20 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 15 | 0 | ||
243638626 | RDDCCD | D | Jan. 27, 2024, 4:14 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 15 | 0 | ||
243709446 | 2018LZY | D | Jan. 28, 2024, 5:14 a.m. | OK | GNU C++20 (64) | TESTS | 11 | 15 | 102400 | ||
243633775 | FastFreeTask | D | Jan. 27, 2024, 4:06 p.m. | OK | Kotlin 1.7 | TESTS | 11 | 295 | 0 | ||
243682518 | arvindf232 | D | Jan. 27, 2024, 9:15 p.m. | OK | Kotlin 1.9 | TESTS | 11 | 234 | 0 | ||
243641718 | chinerist | D | Jan. 27, 2024, 4:19 p.m. | OK | PyPy 3-64 | TESTS | 11 | 140 | 11161600 | ||
243631378 | Maruzensky | D | Jan. 27, 2024, 4:02 p.m. | OK | PyPy 3-64 | TESTS | 11 | 170 | 9523200 | ||
243630201 | sansen | D | Jan. 27, 2024, 4:01 p.m. | OK | Rust 2021 | TESTS | 11 | 46 | 307200 |
Back to search problems