Educational Codeforces Round 184 (Rated for 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
2169 Educational Codeforces Round 184 (Rated for Div. 2) FINISHED False 7200 13620288 Nov. 14, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2253 ) D2 Removal of a Sequence (Hard Version) PROGRAMMING binary search constructive algorithms divide and conquer greedy implementation math number theory probabilities

This is the hard version of the problem. The difference between the versions is the constraint on (x); in this version, (x \le 10^{12}). Polycarp has a sequence of all natural numbers from (1) to (10^{12}). He decides to modify this sequence by performing the following action (x) times: Simultaneously remove all numbers at positions (y), (2 \cdot y), (3 \cdot y), ..., (m \cdot y \le n), where (n) is the length of the current sequence. After that, Polycarp wants to find the (k)-th number in the remaining sequence or determine that the length of the resulting sequence is less than (k). Help Polycarp solve this problem! Consider an example. Let (x = 2), (y = 3), (k = 5), then: The numbers crossed out with a red line were removed after the first operation, and the numbers crossed out with a blue line were removed after the second operation. Thus, the number at position (k = 5) is the number (10). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10)). The description of the test cases follows. The only line of each test case contains three integers (x), (y), (k) ((1 \le x, y, k \le 10^{12})). For each test case, output a positive integer that is at the (k)-th position in the resulting sequence, or (-1) if the length of the resulting sequence is less than (k).

Tutorials

Educational Codeforces Round 184 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
349035369 little_happy D2 Nov. 15, 2025, 2:51 a.m. OK C++17 (GCC 7-32) TESTS 28 249 0
349038173 matouzouken D2 Nov. 15, 2025, 3:36 a.m. OK C++17 (GCC 7-32) TESTS 28 296 0
348994037 HMMAHIN206 D2 Nov. 14, 2025, 5:03 p.m. OK C++17 (GCC 7-32) TESTS 28 296 0
348982549 sojourns D2 Nov. 14, 2025, 4:24 p.m. OK C++17 (GCC 7-32) TESTS 28 296 0
348980380 Pedaret. D2 Nov. 14, 2025, 4:20 p.m. OK C++17 (GCC 7-32) TESTS 28 296 0
349044889 iamone D2 Nov. 15, 2025, 5:09 a.m. OK C++17 (GCC 7-32) TESTS 29 311 0
349024957 topgap D2 Nov. 14, 2025, 10:15 p.m. OK C++17 (GCC 7-32) TESTS 28 311 0
349026311 topgap D2 Nov. 14, 2025, 10:48 p.m. OK C++17 (GCC 7-32) TESTS 28 312 0
349049935 gitarist D2 Nov. 15, 2025, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 29 327 0
349037072 average_coder_guy D2 Nov. 15, 2025, 3:21 a.m. OK C++17 (GCC 7-32) TESTS 28 327 0
348989347 dbywsc D2 Nov. 14, 2025, 4:37 p.m. OK C++20 (GCC 13-64) TESTS 28 203 0
349031331 samcpp D2 Nov. 15, 2025, 1:27 a.m. OK C++20 (GCC 13-64) TESTS 28 281 0
348990534 UIT.NgocHung D2 Nov. 14, 2025, 4:43 p.m. OK C++20 (GCC 13-64) TESTS 28 296 0
349004979 kerembozkaya D2 Nov. 14, 2025, 6:24 p.m. OK C++20 (GCC 13-64) TESTS 28 311 0
348991894 concuuduoc D2 Nov. 14, 2025, 4:50 p.m. OK C++20 (GCC 13-64) TESTS 28 311 0
349039362 Faisal-Saqib D2 Nov. 15, 2025, 3:56 a.m. OK C++20 (GCC 13-64) TESTS 28 312 0
348993814 H-R-2004 D2 Nov. 14, 2025, 5:02 p.m. OK C++20 (GCC 13-64) TESTS 28 312 0
348982470 prachi194agrawal D2 Nov. 14, 2025, 4:24 p.m. OK C++20 (GCC 13-64) TESTS 28 312 0
348981041 Liuguang_Ji D2 Nov. 14, 2025, 4:21 p.m. OK C++20 (GCC 13-64) TESTS 28 312 0
349036669 Ineesh_reddy D2 Nov. 15, 2025, 3:14 a.m. OK C++20 (GCC 13-64) TESTS 28 312 102400
349020740 wery0 D2 Nov. 14, 2025, 9:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 62 0
349020871 wery0 D2 Nov. 14, 2025, 9:05 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 93 16793600
349020649 wery0 D2 Nov. 14, 2025, 9:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 140 0
349020567 wery0 D2 Nov. 14, 2025, 9 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 140 0
349003120 minhnguyenxuan60 D2 Nov. 14, 2025, 6:10 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 202 0
348999758 Lemuen D2 Nov. 14, 2025, 5:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 202 0
348990643 TheFuturoma D2 Nov. 14, 2025, 4:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 202 0
348986078 Janer D2 Nov. 14, 2025, 4:30 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 202 0
348991811 NekoRolly D2 Nov. 14, 2025, 4:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 265 0
348988418 ddxrS D2 Nov. 14, 2025, 4:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 265 0
349031390 Burhan_Akkus D2 Nov. 15, 2025, 1:28 a.m. OK Java 21 TESTS 28 546 921600
348985750 nikhilsingh_21 D2 Nov. 14, 2025, 4:30 p.m. OK Java 21 TESTS 28 562 1024000
349003059 vineetiwari D2 Nov. 14, 2025, 6:10 p.m. OK Java 21 TESTS 28 608 1945600
348983088 canish005 D2 Nov. 14, 2025, 4:25 p.m. OK Java 21 TESTS 28 656 1228800
349024714 Yousef_Badr D2 Nov. 14, 2025, 10:09 p.m. OK Java 21 TESTS 28 749 921600
348987812 KickassB D2 Nov. 14, 2025, 4:33 p.m. OK Java 21 TESTS 28 781 614400
348981171 xmjlove D2 Nov. 14, 2025, 4:21 p.m. OK Java 8 TESTS 28 546 0
348982429 Samyajit125 D2 Nov. 14, 2025, 4:24 p.m. OK Java 8 TESTS 28 577 0
349012626 SoMeQuit D2 Nov. 14, 2025, 7:30 p.m. OK Java 8 TESTS 28 593 0
348990206 v_potoke D2 Nov. 14, 2025, 4:41 p.m. OK PyPy 3-64 TESTS 28 375 1536000
349002541 Platon_Bogdan D2 Nov. 14, 2025, 6:06 p.m. OK PyPy 3-64 TESTS 28 421 1536000
348982317 Sadra_Koochekzade D2 Nov. 14, 2025, 4:23 p.m. OK PyPy 3-64 TESTS 28 436 1433600
348991541 Only365 D2 Nov. 14, 2025, 4:48 p.m. OK PyPy 3-64 TESTS 28 436 1536000
348980534 imaiwluv D2 Nov. 14, 2025, 4:20 p.m. OK PyPy 3-64 TESTS 28 468 1331200
349045488 hundunlilun1 D2 Nov. 15, 2025, 5:16 a.m. OK PyPy 3-64 TESTS 29 468 1433600
348989689 mr_dp D2 Nov. 14, 2025, 4:38 p.m. OK PyPy 3-64 TESTS 28 483 1331200
349024813 VaHiX D2 Nov. 14, 2025, 10:12 p.m. OK PyPy 3-64 TESTS 28 531 1536000
348980608 Not_PyPy D2 Nov. 14, 2025, 4:20 p.m. OK PyPy 3-64 TESTS 28 531 3891200
349037772 Little_Sheep_Yawn D2 Nov. 15, 2025, 3:31 a.m. OK PyPy 3-64 TESTS 28 562 5017600

remove filters

Back to search problems