Codeforces Round 1004 (Div. 1)

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
2066 Codeforces Round 1004 (Div. 1) FINISHED False 7200 37121123 Feb. 11, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 613 ) D2 Club of Young Aircraft Builders (hard version) PROGRAMMING combinatorics dp math

This is the hard version of the problem. The difference between the versions is that in this version, not necessary (a_i = 0). You can hack only if you solved all versions of this problem. There is a building with (n) floors, numbered from (1) to (n) from bottom to top. There is exactly one person living on each floor. All the residents of the building have an important goal today: to launch at least (c) paper airplanes collectively. The residents will launch the airplanes in turn. When a person from the (i)-th floor launches an airplane, all residents on floors from (1) to (i) can see it as it descends to the ground. If, from the perspective of the resident on the (i)-th floor, at least (c) airplanes have already been launched, they will no longer launch airplanes themselves. It is also known that by the end of the day, from the perspective of each resident in the building, at least (c) airplanes have been launched, and a total of (m) airplanes were thrown. You have been carefully monitoring this flash mob, and for each airplane, you recorded which resident from which floor threw it. Unfortunately, the information about who exactly threw some of the airplanes has been lost. Find the number of ways to fill in the gaps so that the information could be credible. Since the answer could be quite large, output it modulo (10^9 + 7). It is also possible that you made a mistake in your records, and there is no possible way to restore the gaps. In that case, the answer is considered to be (0). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains three integers (n, c, m) ((1 \le n \le 100), (1 \le c \le 100), (c \le m \le n \cdot c)) — the number of floors in the building, the minimum required number of airplanes, and the number of airplanes a

Tutorials

139415

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
305693750 Um_nik D2 Feb. 11, 2025, 4:28 p.m. OK C++17 (GCC 7-32) TESTS 79 265 4403200
305755264 lmh_qwq D2 Feb. 12, 2025, 4:22 a.m. OK C++17 (GCC 7-32) TESTS 79 390 17408000
305705597 Az3ar D2 Feb. 11, 2025, 5:32 p.m. OK C++17 (GCC 7-32) TESTS 79 593 5427200
305743865 KellyWLJ D2 Feb. 12, 2025, 1:26 a.m. OK C++17 (GCC 7-32) TESTS 79 718 9318400
305697916 as_dfsdf D2 Feb. 11, 2025, 4:32 p.m. OK C++17 (GCC 7-32) TESTS 79 843 35635200
305671414 Sai_t D2 Feb. 11, 2025, 3:47 p.m. OK C++17 (GCC 7-32) TESTS 79 968 17203200
305705431 grass8sheep D2 Feb. 11, 2025, 5:31 p.m. OK C++17 (GCC 7-32) TESTS 79 1109 490086400
305674842 leinad2 D2 Feb. 11, 2025, 3:53 p.m. OK C++17 (GCC 7-32) TESTS 79 1125 18022400
305753520 OdtreeKing D2 Feb. 12, 2025, 4:01 a.m. OK C++17 (GCC 7-32) TESTS 79 1171 4812800
305755542 Lacrymira D2 Feb. 12, 2025, 4:26 a.m. OK C++17 (GCC 7-32) TESTS 79 1264 34508800
305738172 maxplus D2 Feb. 11, 2025, 11:04 p.m. OK C++20 (GCC 13-64) TESTS 79 108 204800
305735772 ahsoltan D2 Feb. 11, 2025, 10:10 p.m. OK C++20 (GCC 13-64) TESTS 79 109 4198400
305758069 RDDCCD D2 Feb. 12, 2025, 4:59 a.m. OK C++20 (GCC 13-64) TESTS 79 109 8601600
305682836 Graygoo_401 D2 Feb. 11, 2025, 4:08 p.m. OK C++20 (GCC 13-64) TESTS 79 109 17100800
305743918 qiuzx D2 Feb. 12, 2025, 1:26 a.m. OK C++20 (GCC 13-64) TESTS 79 124 8704000
305669083 kotatsugame D2 Feb. 11, 2025, 3:44 p.m. OK C++20 (GCC 13-64) TESTS 79 140 4198400
305669541 Flamire D2 Feb. 11, 2025, 3:44 p.m. OK C++20 (GCC 13-64) TESTS 79 156 4710400
305751951 chrhaaeon D2 Feb. 12, 2025, 3:40 a.m. OK C++20 (GCC 13-64) TESTS 79 171 4505600
305689664 xuanxuan001 D2 Feb. 11, 2025, 4:20 p.m. OK C++20 (GCC 13-64) TESTS 79 187 512000
305687841 kizen D2 Feb. 11, 2025, 4:17 p.m. OK C++20 (GCC 13-64) TESTS 79 187 9523200
305759202 Xiaohuba D2 Feb. 12, 2025, 5:14 a.m. OK C++23 (GCC 14-64, msys2) TESTS 79 140 307200
305675429 strapple D2 Feb. 11, 2025, 3:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 171 16998400
305648746 Kevin114514 D2 Feb. 11, 2025, 3:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 187 7168000
305681813 rehan_amaan_how_so_good D2 Feb. 11, 2025, 4:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 202 204800
305687224 PinkieRabbit D2 Feb. 11, 2025, 4:16 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 233 4915200
305756356 Network_Error D2 Feb. 12, 2025, 4:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 79 234 409600
305689109 Sugar_fan D2 Feb. 11, 2025, 4:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 249 102400
305673972 GroupMatrix D2 Feb. 11, 2025, 3:52 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 265 307200
305697650 Endagorion D2 Feb. 11, 2025, 4:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 280 512000
305688428 Farhod D2 Feb. 11, 2025, 4:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 79 312 10854400
305740896 rainboy D2 Feb. 12, 2025, 12:20 a.m. OK GNU C11 TESTS 79 1155 204800
305649652 Electromaster D2 Feb. 11, 2025, 3:14 p.m. OK Kotlin 1.9 TESTS 79 2125 6758400
305725367 aPNJ777 D2 Feb. 11, 2025, 8:08 p.m. OK PyPy 3-64 TESTS 79 1764 41984000
305677532 chinerist D2 Feb. 11, 2025, 3:58 p.m. OK PyPy 3-64 TESTS 79 3624 20172800
305681139 Egor D2 Feb. 11, 2025, 4:05 p.m. OK Rust 2021 TESTS 79 592 12800000

remove filters

Back to search problems