Codeforces Round 988 (Div. 3)

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
2037 Codeforces Round 988 (Div. 3) FINISHED False 8100 44551523 Nov. 17, 2024, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2960 ) F Ardent Flames PROGRAMMING binary search data structures sortings two pointers

You have obtained the new limited event character Xilonen. You decide to use her in combat. There are (n) enemies in a line. The (i)'th enemy from the left has health (h_i) and is currently at position (x_i). Xilonen has an attack damage of (m), and you are ready to defeat the enemies with her. Xilonen has a powerful "ground stomp" attack. Before you perform any attacks , you select an integer (p) and position Xilonen there ((p) can be any integer position, including a position with an enemy currently). Afterwards, for each attack, she deals (m) damage to an enemy at position (p) (if there are any), (m-1) damage to enemies at positions (p-1) and (p+1), (m-2) damage to enemies at positions (p-2) and (p+2), and so on. Enemies that are at least a distance of (m) away from Xilonen take no damage from attacks. Formally, if there is an enemy at position (x), she will deal (\max(0,m - |p - x|)) damage to that enemy each hit. Note that you may not choose a different (p) for different attacks. Over all possible (p), output the minimum number of attacks Xilonen must perform to defeat at least (k) enemies. If it is impossible to find a (p) such that eventually at least (k) enemies will be defeated, output (-1) instead. Note that an enemy is considered to be defeated if its health reaches (0) or below. The first line contains an integer (t) ((1 \leq t \leq 10^4)) – the number of test cases. The first line of each test case contains three integers (n), (m), and (k) ((1 \leq k \leq n \leq 10^5), (1 \leq m \leq 10^9)). The following line contains (n) integers (h_1, h_2, ..., h_n) ((1 \leq h_i \leq 10^9)). The last line of each testcase contains (n) integers (x_1, x_2, ..., x_n) ((1\leq x_i \leq 10^9), (x_i < x_{i+1}) for all (1 \leq i < n)) It is guaranteed that the sum of (n) over all test cases does not exce

Tutorials

Video Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
292150540 DangKhoizzzz F Nov. 18, 2024, 9:24 a.m. OK C++17 (GCC 7-32) TESTS 20 312 819200
292200634 pagemrw F Nov. 18, 2024, 2:23 p.m. OK C++17 (GCC 7-32) TESTS 20 342 819200
292209959 Romicro F Nov. 18, 2024, 3:18 p.m. OK C++17 (GCC 7-32) TESTS 20 359 819200
292113727 whb569 F Nov. 18, 2024, 1:25 a.m. OK C++17 (GCC 7-32) TESTS 20 389 3276800
292156873 Koliya F Nov. 18, 2024, 10:21 a.m. OK C++17 (GCC 7-32) TESTS 20 437 307200
292264796 FifthAxiom F Nov. 19, 2024, 2:36 a.m. OK C++17 (GCC 7-32) TESTS 20 452 819200
292189499 k1nsom F Nov. 18, 2024, 1:21 p.m. OK C++17 (GCC 7-32) TESTS 20 452 8089600
292150409 DangKhoizzzz F Nov. 18, 2024, 9:23 a.m. OK C++17 (GCC 7-32) TESTS 20 467 2662400
292250435 meetsarvan F Nov. 18, 2024, 8:49 p.m. OK C++17 (GCC 7-32) TESTS 20 484 307200
292111304 imok_kimo F Nov. 18, 2024, 12:13 a.m. OK C++17 (GCC 7-32) TESTS 20 484 307200
292273816 MegalovaniaJ F Nov. 19, 2024, 4:34 a.m. OK C++20 (GCC 13-64) TESTS 20 280 102400
292129366 MintCat F Nov. 18, 2024, 5:39 a.m. OK C++20 (GCC 13-64) TESTS 20 311 6553600
292258661 anfanite396 F Nov. 19, 2024, 12:08 a.m. OK C++20 (GCC 13-64) TESTS 20 312 3276800
292222086 OrcSlop F Nov. 18, 2024, 4:37 p.m. OK C++20 (GCC 13-64) TESTS 20 327 819200
292116375 ventusliberum F Nov. 18, 2024, 2:25 a.m. OK C++20 (GCC 13-64) TESTS 20 343 0
292223326 OrcSlop F Nov. 18, 2024, 4:45 p.m. OK C++20 (GCC 13-64) TESTS 20 343 819200
292215861 Your6QwQ F Nov. 18, 2024, 3:55 p.m. OK C++20 (GCC 13-64) TESTS 20 343 3276800
292213910 Arkweedy F Nov. 18, 2024, 3:42 p.m. OK C++20 (GCC 13-64) TESTS 20 359 102400
292148535 akibb123 F Nov. 18, 2024, 9:08 a.m. OK C++20 (GCC 13-64) TESTS 20 359 1331200
292256216 dougalves F Nov. 18, 2024, 10:48 p.m. OK C++20 (GCC 13-64) TESTS 20 374 1945600
292127391 find F Nov. 18, 2024, 5:12 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 311 0
292207143 190y F Nov. 18, 2024, 3:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 327 2252800
292161721 Suzuranovo F Nov. 18, 2024, 10:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 343 1843200
292174513 ShelpAm F Nov. 18, 2024, noon OK C++23 (GCC 14-64, msys2) TESTS 20 405 102400
292218136 __Chirag__ F Nov. 18, 2024, 4:10 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 406 1228800
292123979 pranavachaitanyaballa F Nov. 18, 2024, 4:24 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 436 4300800
292127646 find F Nov. 18, 2024, 5:15 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 437 1433600
292264904 BloomingSummerEnding F Nov. 19, 2024, 2:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 452 1433600
292224795 qwedc001 F Nov. 18, 2024, 4:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 452 1433600
292127352 convective_rain F Nov. 18, 2024, 5:11 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 452 1536000
292123172 0x3F F Nov. 18, 2024, 4:13 a.m. OK Go TESTS 20 1452 36659200
292223416 cpp10 F Nov. 18, 2024, 4:46 p.m. OK Java 21 TESTS 20 2390 10035200
292223588 cpp10 F Nov. 18, 2024, 4:47 p.m. OK Java 21 TESTS 20 2437 8704000
292122591 iamalizaidi F Nov. 18, 2024, 4:05 a.m. OK Java 21 TESTS 20 2453 8601600
292145526 InfinityX F Nov. 18, 2024, 8:41 a.m. OK Java 21 TESTS 20 2687 15462400
292211754 v7fgg F Nov. 18, 2024, 3:29 p.m. OK Java 21 TESTS 20 2906 18022400
292209689 v7fgg F Nov. 18, 2024, 3:16 p.m. OK Java 21 TESTS 20 3280 18841600
292254545 miaplays F Nov. 18, 2024, 10:05 p.m. OK PyPy 3-64 TESTS 20 1109 26419200
292258831 A_G F Nov. 19, 2024, 12:13 a.m. OK PyPy 3-64 TESTS 20 1125 23961600
292263064 iygav1238 F Nov. 19, 2024, 1:59 a.m. OK PyPy 3-64 TESTS 20 1156 23244800
292260144 DarkTemplarDrop F Nov. 19, 2024, 12:47 a.m. OK PyPy 3-64 TESTS 20 1968 39936000
292116704 Little_Sheep_Yawn F Nov. 18, 2024, 2:31 a.m. OK PyPy 3-64 TESTS 20 2015 67788800
292208703 krism F Nov. 18, 2024, 3:10 p.m. OK PyPy 3-64 TESTS 20 2812 61337600
292208948 krism F Nov. 18, 2024, 3:12 p.m. OK PyPy 3-64 TESTS 20 2812 65228800
292275003 ketuOP F Nov. 19, 2024, 4:52 a.m. OK PyPy 3-64 TESTS 20 2952 33177600
292244025 the_last_smilodon F Nov. 18, 2024, 7:29 p.m. OK PyPy 3-64 TESTS 20 3125 40960000
292119997 halphy F Nov. 18, 2024, 3:26 a.m. OK Rust 2021 TESTS 20 1468 14438400

remove filters

Back to search problems