Codeforces Round 1012 (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
2089 Codeforces Round 1012 (Div. 1) FINISHED False 9000 33697523 March 23, 2025, 5:35 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 254 ) C2 Key of Like (Hard Version) PROGRAMMING dp math probabilities

This is the hard version of the problem. The difference between the versions is that in this version, (k) can be non-zero. You can hack only if you solved all versions of this problem. A toy box is a refrigerator filled with childhood delight. Like weakness, struggle, hope ... When such a sleeper is reawakened, what kind of surprises will be waiting? M received her toy box as a birthday present from her mother. A jewellery designer would definitely spare no effort in decorating yet another priceless masterpiece as a starry firmament with exquisitely shaped gemstones. In addition, (l) distinct locks secure the tiny universe of her lovely daughter: a hair clip featuring a flower design, a weathered feather pen, a balloon shaped like the letter M ... each piece obscures a precious moment. A few days ago, M rediscovered her toy box when she was reorganizing her bedroom, along with a ring of keys uniquely designed for the toy box. Attached to the key ring are ((l + k)) keys, of which (l) keys are able to open one of the (l) locks correspondingly, while the other (k) keys are nothing but counterfeits to discourage brute-force attack. To remind the correspondence, M's mother adorned each key with a gemstone of a different type. However, passing days have faded M's memory away. "... So I have to turn to you all," M said while laying that ring of keys on the table. K picked up the keys and examined them carefully. "The appearance of these keys unveils nothing fruitful. Thus, I am afraid that we shall inspect them sequentially." Although everyone is willing to help M, nobody has a plan. Observing others' reactions, T suggested, "Let's play a game. Everyone tries a key in turn, and who opens the most locks is amazing ." (n) members, including M herself, take turns to unlock the toy box recursively in the same order until all the (l) locks are unlocked. At each turn, the current member only selects a single key and tests it on exactly o

Tutorials

Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
312148853 songke123 C2 March 24, 2025, 6:03 a.m. OK C++17 (GCC 7-32) TESTS 39 1546 259891200
312024268 Morphed C2 March 23, 2025, 7:46 a.m. OK C++17 (GCC 7-32) TESTS 39 1578 112332800
312130838 taiwanguo C2 March 24, 2025, 12:43 a.m. OK C++17 (GCC 7-32) TESTS 39 1827 164454400
312010341 JDScript0117 C2 March 23, 2025, 7:09 a.m. OK C++20 (GCC 13-64) TESTS 39 327 52224000
312038465 rqoi031 C2 March 23, 2025, 8:52 a.m. OK C++20 (GCC 13-64) TESTS 39 436 63180800
311986572 tourist C2 March 23, 2025, 6:13 a.m. OK C++20 (GCC 13-64) TESTS 39 593 59904000
312018999 rin204 C2 March 23, 2025, 7:32 a.m. OK C++20 (GCC 13-64) TESTS 39 655 56012800
312093614 A_G C2 March 23, 2025, 3:56 p.m. OK C++20 (GCC 13-64) TESTS 39 718 102400
312136811 SoLX C2 March 24, 2025, 2:50 a.m. OK C++20 (GCC 13-64) TESTS 39 843 165171200
312069029 Dart-Xeyter C2 March 23, 2025, 12:30 p.m. OK C++20 (GCC 13-64) TESTS 39 905 104243200
312015915 BurnedChicken C2 March 23, 2025, 7:23 a.m. OK C++20 (GCC 13-64) TESTS 39 937 56934400
312032039 Miracle_Creater C2 March 23, 2025, 8:04 a.m. OK C++20 (GCC 13-64) TESTS 39 952 52224000
312046434 dlalswp25 C2 March 23, 2025, 9:43 a.m. OK C++20 (GCC 13-64) TESTS 39 984 255283200
312042997 iakovlev.zakhar C2 March 23, 2025, 9:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 249 8499200
312024295 LJC00118 C2 March 23, 2025, 7:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 421 54784000
312034993 ainta C2 March 23, 2025, 8:33 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 421 57753600
312035608 bribritt C2 March 23, 2025, 8:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 531 48742400
312105095 Benq C2 March 23, 2025, 5:51 p.m. OK C++23 (GCC 14-64, msys2) TESTS 39 577 102400
312137557 NKheyuxiang C2 March 24, 2025, 3:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 578 111616000
312113540 kevin C2 March 23, 2025, 7:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 39 687 204800
311993140 jiangly C2 March 23, 2025, 6:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 718 102400
312097672 529 C2 March 23, 2025, 4:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 39 936 102400
312034811 YuukiS C2 March 23, 2025, 8:32 a.m. OK C++23 (GCC 14-64, msys2) TESTS 39 1015 102400
312101064 arvindf232 C2 March 23, 2025, 5:12 p.m. OK Kotlin 1.7 TESTS 39 2968 212582400
312026517 conqueror_of_tourist C2 March 23, 2025, 7:52 a.m. OK PyPy 3-64 TESTS 39 1515 130150400
312024106 Egor C2 March 23, 2025, 7:46 a.m. OK Rust 2021 TESTS 39 452 102400
312036299 sansen C2 March 23, 2025, 8:41 a.m. OK Rust 2021 TESTS 39 828 102400

remove filters

Back to search problems