Codeforces Round 1028 (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
2115 Codeforces Round 1028 (Div. 1) FINISHED False 7200 27703523 May 31, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 903 ) C Gellyfish and Eternal Violet PROGRAMMING combinatorics dp greedy math meet-in-the-middle probabilities

There are (n) monsters, numbered from (1) to (n), in front of Gellyfish. The HP of the (i)-th monster is (h_i). Gellyfish doesn't want to kill them, but she wants to keep these monsters from being a threat to her. So she wants to reduce the HP of all the monsters to exactly (1). Now, Gellyfish, with The Sword Sharpened with Tears, is going to attack the monsters for (m) rounds. For each round: The Sword Sharpened with Tears shines with a probability of (p). Gellyfish can choose whether to attack: If Gellyfish doesn't attack, nothing happens. If Gellyfish chooses to attack and The Sword Sharpened with Tears shines, the HP of all the monsters will be reduced by (1). If Gellyfish chooses to attack and The Sword Sharpened with Tears does not shine, Gellyfish can choose one of the monsters and reduce its HP by (1). If Gellyfish doesn't attack, nothing happens. If Gellyfish chooses to attack and The Sword Sharpened with Tears shines, the HP of all the monsters will be reduced by (1). If Gellyfish chooses to attack and The Sword Sharpened with Tears does not shine, Gellyfish can choose one of the monsters and reduce its HP by (1). Please note that before Gellyfish decides whether or not to attack, she will know whether the sword shines or not. Also, when the sword shines, Gellyfish can only make attacks on all the monsters and cannot make an attack on only one monster. Now, Gellyfish wants to know what the probability is that she will reach her goal if she makes choices optimally during the battle. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line of each test case contains three integers (n), (m), and (p') ((1 \leq n \leq 20), (1 \leq m \leq 4000), (0 \leq p' \leq 100)) — the number of monsters, the number of rounds of attacks, and an integer representing the prob

Tutorials

Codeforces Round 1028 (Div.1, Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
322300797 -adhd- C May 31, 2025, 5:49 p.m. OK C++17 (GCC 7-32) TESTS 20 562 514355200
322288939 _lazytag_ C May 31, 2025, 4:27 p.m. OK C++17 (GCC 7-32) TESTS 20 640 286105600
322293231 Sai_t C May 31, 2025, 4:33 p.m. OK C++17 (GCC 7-32) TESTS 20 890 386150400
322256498 Morphed C May 31, 2025, 3:39 p.m. OK C++17 (GCC 7-32) TESTS 20 905 385024000
322318175 hzk_cpp C May 31, 2025, 8:25 p.m. OK C++17 (GCC 7-32) TESTS 23 905 765132800
322268961 IZONE C May 31, 2025, 3:56 p.m. OK C++17 (GCC 7-32) TESTS 20 936 541286400
322336859 fengqiyuka C June 1, 2025, 3:44 a.m. OK C++17 (GCC 7-32) TESTS 25 1139 522854400
322276091 radoslav11 C May 31, 2025, 4:07 p.m. OK C++17 (GCC 7-32) TESTS 20 1484 383590400
322310689 KroosTheKeenGlint C May 31, 2025, 6:56 p.m. OK C++17 (GCC 7-32) TESTS 22 1577 398438400
322237987 JDScript0117 C May 31, 2025, 3:18 p.m. OK C++17 (GCC 7-32) TESTS 20 1671 577331200
322301696 __baozii__ C May 31, 2025, 5:54 p.m. OK C++20 (GCC 13-64) TESTS 20 124 10854400
322335919 fishcathu C June 1, 2025, 3:31 a.m. OK C++20 (GCC 13-64) TESTS 25 233 128921600
322335777 fishcathu C June 1, 2025, 3:28 a.m. OK C++20 (GCC 13-64) TESTS 25 249 257843200
322250645 afuafu C May 31, 2025, 3:32 p.m. OK C++20 (GCC 13-64) TESTS 20 312 204800
322335480 fishcathu C June 1, 2025, 3:24 a.m. OK C++20 (GCC 13-64) TESTS 25 327 257843200
322301579 LuCpp C May 31, 2025, 5:53 p.m. OK C++20 (GCC 13-64) TESTS 20 343 270131200
322314054 ali2005_syr C May 31, 2025, 7:31 p.m. OK C++20 (GCC 13-64) TESTS 22 374 13004800
322255151 Liuxizai C May 31, 2025, 3:38 p.m. OK C++20 (GCC 13-64) TESTS 20 389 325120000
322291510 while_zeze C May 31, 2025, 4:31 p.m. OK C++20 (GCC 13-64) TESTS 20 390 275660800
322282144 lyx123886a123886 C May 31, 2025, 4:16 p.m. OK C++20 (GCC 13-64) TESTS 20 421 427724800
322286680 SomethingNew C May 31, 2025, 4:23 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 171 32153600
322302824 nifeshe C May 31, 2025, 6 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 186 204800
322250049 gloria_mundi C May 31, 2025, 3:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 218 102400
322247023 ksun48 C May 31, 2025, 3:28 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 265 2560000
322262817 ecnerwala C May 31, 2025, 3:48 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 281 2560000
322242092 jiangly C May 31, 2025, 3:22 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 296 102400
322278666 askr_58 C May 31, 2025, 4:10 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 311 102400
322287140 superguymj C May 31, 2025, 4:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 327 257228800
322279893 now_cow C May 31, 2025, 4:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 359 204800
322316138 nifeshe C May 31, 2025, 7:58 p.m. OK C++23 (GCC 14-64, msys2) TESTS 22 374 102400
322288427 darnley C May 31, 2025, 4:26 p.m. OK Kotlin 1.9 TESTS 20 1452 457216000
322324361 darnley C May 31, 2025, 10:36 p.m. OK Kotlin 1.9 TESTS 24 1843 457216000
322329933 golomb C June 1, 2025, 1:48 a.m. OK PyPy 3-64 TESTS 25 1921 71475200
322333990 sansen C June 1, 2025, 2:59 a.m. OK Rust 2021 TESTS 25 937 252825600

remove filters

Back to search problems