Codeforces Global Round 29 (Div. 1 + Div. 2)

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
2147 Codeforces Global Round 29 (Div. 1 + Div. 2) FINISHED False 10800 18026723 Sept. 20, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 132 ) I1 Longest Increasing Path (Easy Version) PROGRAMMING constructive algorithms

This is the easy version of the problem. The difference between the versions is that in this version the second test is (n=100\,000). Hacks are not allowed in this problem. Let's call an integer sequence (a_1, a_2, \ldots, a_n) distance-convex if (|a_{i} - a_{i-1}| < |a_{i+1} - a_{i}|) for every (1 < i < n). In other words, if you jump through the points (a_1, a_2, \ldots, a_n) on the number line in this order, each next jump is strictly longer than the previous one. You are given two integers (n) and (m). Find a distance-convex sequence (a) of length (n) that contains at most (m) distinct values . In terms of the jump sequence, that would mean that you need to make ((n-1)) jumps of increasing lengths while visiting at most (m) distinct points. (-10^{18} \le a_i \le 10^{18}) should hold for all (1 \le i \le n). Input consists of two integers (n) and (m) on a single line. There are only 2 tests for this problem. (n = 8), (m = 6); (n = 100\,000), (m = 15\,000). Hacks are not allowed in this problem. Print a distance-convex sequence (a_1, a_2, \ldots, a_n) that contains at most (m) distinct values. (-10^{18} \le a_i \le 10^{18}) should hold for all (1 \le i \le n). If there are multiple solutions, print any of them. The sequence (1, 1, 3, 6, 10, 3, 11, 1) has length (n=8) and contains (5) different values, which is less than or equal to (m=6). The differences between consecutive values are (0,2,3,4,7,8,10), a strictly increasing sequence. (1, 1, 2, 4, 8, 16, 32, 1) would be another valid answer.

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
339592685 lotusblume I1 Sept. 20, 2025, 5:01 p.m. OK C++17 (GCC 7-32) TESTS 2 61 0
339618421 solarlity I1 Sept. 20, 2025, 7:31 p.m. OK C++17 (GCC 7-32) TESTS 2 62 0
339641989 Miracle_Creater I1 Sept. 21, 2025, 2:32 a.m. OK C++17 (GCC 7-32) TESTS 2 77 0
339614236 TheOrangeNyan I1 Sept. 20, 2025, 7 p.m. OK C++17 (GCC 7-32) TESTS 2 77 0
339596292 Sai_t I1 Sept. 20, 2025, 5:12 p.m. OK C++17 (GCC 7-32) TESTS 2 77 0
339611857 Ak_16 I1 Sept. 20, 2025, 6:46 p.m. OK C++17 (GCC 7-32) TESTS 2 77 24166400
339612108 potato167 I1 Sept. 20, 2025, 6:47 p.m. OK C++17 (GCC 7-32) TESTS 2 93 2662400
339637100 qwef_ I1 Sept. 21, 2025, 12:22 a.m. OK C++17 (GCC 7-32) TESTS 2 93 24064000
339628408 diss_quack I1 Sept. 20, 2025, 9:03 p.m. OK C++17 (GCC 7-32) TESTS 2 108 0
339654382 gooonn I1 Sept. 21, 2025, 5:42 a.m. OK C++17 (GCC 7-32) TESTS 2 233 102400
339646426 ballpoint_pen I1 Sept. 21, 2025, 3:57 a.m. OK C++20 (GCC 13-64) TESTS 2 186 102400
339599419 heuristica I1 Sept. 20, 2025, 5:21 p.m. OK C++20 (GCC 13-64) TESTS 2 609 1843200
339646095 RadheKrisna I1 Sept. 21, 2025, 3:50 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 31 3584000
339644779 __akash24_13 I1 Sept. 21, 2025, 3:26 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 0
339618437 Benq I1 Sept. 20, 2025, 7:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 0
339611353 Benq I1 Sept. 20, 2025, 6:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 0
339638096 C0DET1GER I1 Sept. 21, 2025, 12:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 102400
339603796 yosupo I1 Sept. 20, 2025, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 102400
339638999 strapple I1 Sept. 21, 2025, 1:22 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 46 9523200
339645511 RadheKrisna I1 Sept. 21, 2025, 3:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 61 3584000
339616257 treebutton I1 Sept. 20, 2025, 7:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 2 77 0
339646167 SoiMae I1 Sept. 21, 2025, 3:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 2 77 13004800
339632565 rainboy I1 Sept. 20, 2025, 9:59 p.m. OK GNU C11 TESTS 2 452 1638400
339635062 bronze_coder I1 Sept. 20, 2025, 11:12 p.m. OK PyPy 3-64 TESTS 2 108 9728000
339634541 golomb I1 Sept. 20, 2025, 10:54 p.m. OK PyPy 3-64 TESTS 2 124 10649600
339645201 zouyu9631 I1 Sept. 21, 2025, 3:34 a.m. OK PyPy 3-64 TESTS 2 171 15052800

remove filters

Back to search problems