Codeforces Round 1013 (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
2091 Codeforces Round 1013 (Div. 3) FINISHED False 8100 33492323 March 25, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1492 ) G Gleb and Boating PROGRAMMING brute force constructive algorithms data structures dp graphs greedy math shortest paths

Programmer Gleb frequently visits the IT Campus "NEIMARK" to participate in programming training sessions. Not only is Gleb a programmer, but he is also a renowned rower, so he covers part of his journey from home to the campus by kayaking along a river. Assume that Gleb starts at point (0) and must reach point (s) (i.e., travel (s) meters along a straight line). To make the challenge tougher, Gleb has decided not to go outside the segment (0, s). The dimensions of the kayak can be neglected. Gleb is a strong programmer! Initially, his power is (k). Gleb's power directly affects the movement of his kayak. If his current power is (x), then with one paddle stroke the kayak moves (x) meters in the current direction. Gleb can turn around and continue moving in the opposite direction, but such a maneuver is quite challenging, and after each turn, his power decreases by (1). The power can never become (0) — if his current power is (1), then even after turning it remains (1). Moreover, Gleb cannot make two turns in a row — after each turn, he must move at least once before making another turn. Similarly, Gleb cannot make a turn immediately after the start — he must first perform a paddle stroke. Gleb wants to reach point (s) from point (0) without leaving the segment (0, s) and while preserving as much power as possible. Help him — given the value (s) and his initial power (k), determine the maximum possible power he can have upon reaching point (s). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \leq t \leq 100)). The description of the test cases follows. A single line of each test case contains two integers (s) and (k) ((1 \leq s \leq 10^9), (1 \leq k \leq 1000), (k \leq s)). It is guaranteed that the sum of (k) over all test cases does not exceed (2000). For each test case, output the maximum possible po

Tutorials

Codeforces Round 1013 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
312468682 og.kostya G March 25, 2025, 4:58 p.m. OK C# 10 TESTS 25 109 2867200
312481531 chalish_ma G March 25, 2025, 6:37 p.m. OK C++17 (GCC 7-32) TESTS 25 46 32768000
312525505 B_3 G March 26, 2025, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 42 61 0
312511969 mridulgupta G March 26, 2025, 2:49 a.m. OK C++17 (GCC 7-32) TESTS 42 61 102400
312489762 jai_bansal_007 G March 25, 2025, 8:05 p.m. OK C++17 (GCC 7-32) TESTS 26 61 102400
312479278 Brahmendra06 G March 25, 2025, 6:15 p.m. OK C++17 (GCC 7-32) TESTS 25 61 2048000
312474597 kingofcoding1 G March 25, 2025, 5:34 p.m. OK C++17 (GCC 7-32) TESTS 25 61 2048000
312524532 zyb_txdy G March 26, 2025, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 42 61 6246400
312512238 toba G March 26, 2025, 2:54 a.m. OK C++17 (GCC 7-32) TESTS 42 61 8089600
312481747 chalish_ma G March 25, 2025, 6:39 p.m. OK C++17 (GCC 7-32) TESTS 25 61 8192000
312525547 B_3 G March 26, 2025, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 42 62 102400
312516021 Ashwanth.K G March 26, 2025, 3:56 a.m. OK C++20 (GCC 13-64) TESTS 42 46 102400
312470778 enar G March 25, 2025, 5:09 p.m. OK C++20 (GCC 13-64) TESTS 25 46 102400
312479189 alpha1324 G March 25, 2025, 6:14 p.m. OK C++20 (GCC 13-64) TESTS 25 46 4096000
312517599 Ashwanth.K G March 26, 2025, 4:19 a.m. OK C++20 (GCC 13-64) TESTS 42 61 102400
312517310 Ashwanth.K G March 26, 2025, 4:15 a.m. OK C++20 (GCC 13-64) TESTS 42 61 102400
312490799 kaiboy G March 25, 2025, 8:19 p.m. OK C++20 (GCC 13-64) TESTS 26 61 102400
312486206 alex2421 G March 25, 2025, 7:26 p.m. OK C++20 (GCC 13-64) TESTS 26 61 102400
312473320 eyadhjarray111 G March 25, 2025, 5:25 p.m. OK C++20 (GCC 13-64) TESTS 25 61 102400
312470963 enar G March 25, 2025, 5:10 p.m. OK C++20 (GCC 13-64) TESTS 25 61 102400
312469618 enar G March 25, 2025, 5:03 p.m. OK C++20 (GCC 13-64) TESTS 25 61 102400
312483524 Pea_Pea G March 25, 2025, 6:58 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 46 0
312474452 CTGU_23_sxy G March 25, 2025, 5:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 25 46 102400
312524181 p1k4 G March 26, 2025, 5:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 46 102400
312487724 nika-skybytska G March 25, 2025, 7:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 46 102400
312482986 alexwice G March 25, 2025, 6:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 46 102400
312469635 NikitaMartyanov G March 25, 2025, 5:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 25 46 102400
312524044 p1k4 G March 26, 2025, 5:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 61 102400
312509656 Srginit286 G March 26, 2025, 2:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 42 61 102400
312485171 fanhuaxingyu G March 25, 2025, 7:15 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 61 102400
312477186 der_Kaizer G March 25, 2025, 5:57 p.m. OK C++23 (GCC 14-64, msys2) TESTS 25 61 102400
312506697 ansere G March 26, 2025, 1:05 a.m. OK Java 21 TESTS 42 281 1740800
312498750 dzhi G March 25, 2025, 10:17 p.m. OK Java 21 TESTS 26 530 15052800
312509497 lyongwolf G March 26, 2025, 2:02 a.m. OK Java 8 TESTS 42 312 15462400
312468308 omdeshmukh1906 G March 25, 2025, 4:56 p.m. OK Java 8 TESTS 25 1202 0
312520849 gardengnome G March 26, 2025, 5:02 a.m. OK PyPy 3-64 TESTS 42 124 17715200
312514189 smilences G March 26, 2025, 3:28 a.m. OK PyPy 3-64 TESTS 42 156 43622400
312512966 smilences G March 26, 2025, 3:06 a.m. OK PyPy 3-64 TESTS 42 156 52633600
312475830 Little_Sheep_Yawn G March 25, 2025, 5:45 p.m. OK PyPy 3-64 TESTS 25 171 8089600
312520469 gardengnome G March 26, 2025, 4:57 a.m. OK PyPy 3-64 TESTS 42 171 17715200
312470986 blackSki G March 25, 2025, 5:10 p.m. OK PyPy 3-64 TESTS 25 280 70656000
312524650 Charming G March 26, 2025, 5:48 a.m. OK PyPy 3-64 TESTS 42 1296 136908800
312523617 Charming G March 26, 2025, 5:35 a.m. OK PyPy 3-64 TESTS 42 1311 137011200
312524259 Charming G March 26, 2025, 5:43 a.m. OK PyPy 3-64 TESTS 42 1374 136499200
312509297 yinyao G March 26, 2025, 1:59 a.m. OK PyPy 3-64 TESTS 42 1734 170700800
312483274 DachiVartagava G March 25, 2025, 6:56 p.m. OK Python 3 TESTS 26 249 3174400
312468358 kar1mzadeh G March 25, 2025, 4:57 p.m. OK Python 3 TESTS 25 265 3174400
312513724 Dpkasd_12 G March 26, 2025, 3:20 a.m. OK Rust 2021 TESTS 42 62 102400
312489621 DanielAnker G March 25, 2025, 8:03 p.m. OK Rust 2021 TESTS 26 62 102400
312467938 darkkcyan G March 25, 2025, 4:55 p.m. OK Rust 2021 TESTS 25 718 52940800

remove filters

Back to search problems