Codeforces Round 1025 (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
2109 Codeforces Round 1025 (Div. 2) FINISHED False 8100 28913123 May 17, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 11324 ) C1 Hacking Numbers (Easy Version) PROGRAMMING bitmasks constructive algorithms interactive math number theory

This is the easy version of the problem. In this version, you can send at most (\mathbf{7}) commands. You can make hacks only if all versions of the problem are solved. This is an interactive problem. Welcome, Duelists! In this interactive challenge, there is an unknown integer (x) ((1 \le x \le 10^9)). You must make it equal to a given integer in the input (n). By harnessing the power of "Mathmech" monsters, you can send a command to do one of the following: You have to make (x) equal to (n) using at most (\mathbf{7}) commands. (^{\text{∗}})(S(n)) is a function that returns the sum of all the individual digits of a non-negative integer (n). For example, (S(123) = 1 + 2 + 3 = 6) Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 5000)). The description of the test cases follows. The first and only line of each test case contains one integer (n) ((1 \le n \le 10^9)). The interaction for each test case begins by reading the integer (n). To send a command, output a line in the following format: "add (y)" Add some integer (y) ((-10^{18} \le y \le 10^{18})) to (x). The jury will output "1" if (x + y) is within (1, 10^{18}) ( successful ), and "0" otherwise. If successful, update (x \leftarrow x + y). The jury will output "1" if (x + y) is within (1, 10^{18}) ( successful ), and "0" otherwise. If successful, update (x \leftarrow x + y). "mul (y)" Multiply (x) by a positive integer (y) ((1 \le y \le 10^{18})). The jury will output "1" if (x \cdot y) is within (1, 10^{18}) ( successful ), and "0" otherwise. If successful, update (x \leftarrow x \cdot y). The jury will output "1" if (x \cdot y) is within (1, 10^{18}) ( successful ), and "0" otherwise. If successful, update (x \leftarrow x \cdot y). "div (y)" Divide (x) by a positive integer (y) ($$$

Tutorials

Codeforces Round 1025 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
320167796 sachinsingh16404 C1 May 18, 2025, 2:17 a.m. OK C++17 (GCC 7-32) TESTS 20 202 0
320159429 Levi0p C1 May 17, 2025, 10:19 p.m. OK C++17 (GCC 7-32) TESTS 20 202 102400
320157553 ritsrnjn C1 May 17, 2025, 9:31 p.m. OK C++17 (GCC 7-32) TESTS 20 203 102400
320179000 Ayush_2023 C1 May 18, 2025, 4:19 a.m. OK C++17 (GCC 7-32) TESTS 20 217 102400
320181721 vishwatej_shende C1 May 18, 2025, 4:57 a.m. OK C++17 (GCC 7-32) TESTS 20 218 102400
320178365 renegade1050 C1 May 18, 2025, 4:09 a.m. OK C++17 (GCC 7-32) TESTS 20 218 102400
320160000 adityaJain__8789 C1 May 17, 2025, 10:36 p.m. OK C++17 (GCC 7-32) TESTS 20 218 102400
320183627 the_escapist C1 May 18, 2025, 5:19 a.m. OK C++17 (GCC 7-32) TESTS 20 218 1638400
320170888 0biwan_kenobi C1 May 18, 2025, 3:06 a.m. OK C++17 (GCC 7-32) TESTS 20 233 0
320130051 1234_5678_9123 C1 May 17, 2025, 4:43 p.m. OK C++17 (GCC 7-32) TESTS 20 233 0
320170304 fishcathu C1 May 18, 2025, 2:57 a.m. OK C++20 (GCC 13-64) TESTS 20 140 102400
320160209 Homz C1 May 17, 2025, 10:41 p.m. OK C++20 (GCC 13-64) TESTS 20 171 102400
320131582 SPIDY4488 C1 May 17, 2025, 4:46 p.m. OK C++20 (GCC 13-64) TESTS 20 171 102400
320158690 jaindhairya2001 C1 May 17, 2025, 9:56 p.m. OK C++20 (GCC 13-64) TESTS 20 186 0
320146046 Manas_DixiT C1 May 17, 2025, 6:55 p.m. OK C++20 (GCC 13-64) TESTS 20 187 0
320130327 kaisellin C1 May 17, 2025, 4:43 p.m. OK C++20 (GCC 13-64) TESTS 20 187 0
320159521 Ayham_Alsalman C1 May 17, 2025, 10:21 p.m. OK C++20 (GCC 13-64) TESTS 20 187 102400
320165895 LoneTree0 C1 May 18, 2025, 1:38 a.m. OK C++20 (GCC 13-64) TESTS 20 202 0
320165618 gouhhmumu C1 May 18, 2025, 1:31 a.m. OK C++20 (GCC 13-64) TESTS 20 202 0
320184789 raghavgupta256 C1 May 18, 2025, 5:31 a.m. OK C++20 (GCC 13-64) TESTS 20 202 102400
320174593 lrx___ C1 May 18, 2025, 4:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 171 102400
320130344 tuanotuan C1 May 17, 2025, 4:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 186 819200
320185672 Aegleseekers C1 May 18, 2025, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 187 0
320145936 YuJiahe C1 May 17, 2025, 6:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 187 0
320180457 Rohit_kaushik C1 May 18, 2025, 4:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 187 102400
320174953 Daisuki.241_ C1 May 18, 2025, 4:06 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 187 102400
320148365 rpm_1111 C1 May 17, 2025, 7:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 187 102400
320164914 ramann_696 C1 May 18, 2025, 1:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 20 202 102400
320140087 kabirmittal C1 May 17, 2025, 6:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 202 102400
320139736 itsiftikar02 C1 May 17, 2025, 6:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 20 202 102400
320139828 priyaroy3370 C1 May 17, 2025, 6:12 p.m. OK Java 21 TESTS 20 671 1331200
320150916 Kunwar_Bhathal C1 May 17, 2025, 7:49 p.m. OK Java 21 TESTS 20 734 819200
320133521 MarcAS C1 May 17, 2025, 4:49 p.m. OK Java 21 TESTS 20 796 1126400
320132522 AJ_Forces C1 May 17, 2025, 4:47 p.m. OK Java 21 TESTS 20 843 1331200
320155102 GGbro C1 May 17, 2025, 8:47 p.m. OK Java 21 TESTS 20 843 2048000
320128361 Diptarshi C1 May 17, 2025, 4:40 p.m. OK Java 21 TESTS 20 890 2048000
320170771 y.d.chandra_kumar C1 May 18, 2025, 3:04 a.m. OK Java 21 TESTS 20 921 1740800
320188231 barbarian C1 May 18, 2025, 6:04 a.m. OK Java 21 TESTS 20 952 1638400
320186248 Nobita-Niyan C1 May 18, 2025, 5:45 a.m. OK Java 21 TESTS 20 952 2048000
320132644 brocodes98 C1 May 17, 2025, 4:47 p.m. OK Java 21 TESTS 20 999 1331200
320180591 Ovetsar_ilish C1 May 18, 2025, 4:42 a.m. OK Java 8 TESTS 20 968 0
320129206 yimLo C1 May 17, 2025, 4:41 p.m. OK Java 8 TESTS 20 1046 0
320132545 Shreerangss C1 May 17, 2025, 4:47 p.m. OK Java 8 TESTS 20 1093 0
320151461 TheJackedBrain C1 May 17, 2025, 7:56 p.m. OK Java 8 TESTS 20 1125 0
320143282 abbasslb C1 May 17, 2025, 6:32 p.m. OK Java 8 TESTS 20 1155 0
320145796 bio-duplex C1 May 17, 2025, 6:53 p.m. OK Kotlin 1.9 TESTS 20 624 0
320128756 _gaurav_3043 C1 May 17, 2025, 4:41 p.m. OK PyPy 3 TESTS 20 889 4608000
320153975 devjain_1028 C1 May 17, 2025, 8:30 p.m. OK PyPy 3 TESTS 20 1203 5734400
320146206 extr3m3 C1 May 17, 2025, 6:57 p.m. OK PyPy 3 TESTS 20 1359 8192000
320141221 cant_codeTM C1 May 17, 2025, 6:19 p.m. OK PyPy 3 TESTS 20 1499 7680000
320141365 minuki646 C1 May 17, 2025, 6:20 p.m. OK PyPy 3-64 TESTS 20 484 4096000
320161284 7_divided_by_3 C1 May 17, 2025, 11:15 p.m. OK PyPy 3-64 TESTS 20 546 5222400
320164203 ekinAbstract C1 May 18, 2025, 12:56 a.m. OK PyPy 3-64 TESTS 20 577 4198400
320163607 ibraheemkureshi C1 May 18, 2025, 12:37 a.m. OK PyPy 3-64 TESTS 20 577 4300800
320161084 monocrap C1 May 17, 2025, 11:08 p.m. OK PyPy 3-64 TESTS 20 577 5222400
320173197 vss103824_Umar.Farooq C1 May 18, 2025, 3:41 a.m. OK PyPy 3-64 TESTS 20 577 7168000
320172184 vss103824_Umar.Farooq C1 May 18, 2025, 3:25 a.m. OK PyPy 3-64 TESTS 20 577 7168000
320128982 Tanuj_941 C1 May 17, 2025, 4:41 p.m. OK PyPy 3-64 TESTS 20 593 3686400
320169964 aneesh2002 C1 May 18, 2025, 2:52 a.m. OK PyPy 3-64 TESTS 20 593 8601600
320186367 Bakytz7zaN C1 May 18, 2025, 5:47 a.m. OK PyPy 3-64 TESTS 20 609 6656000
320179081 biltharesatyendra C1 May 18, 2025, 4:20 a.m. OK Python 2 TESTS 20 280 0
320168048 pundruvarshith17 C1 May 18, 2025, 2:22 a.m. OK Python 3 TESTS 20 499 409600
320129239 BiniyamEshetu C1 May 17, 2025, 4:41 p.m. OK Python 3 TESTS 20 671 409600
320162088 Alex12GOAT C1 May 17, 2025, 11:42 p.m. OK Python 3 TESTS 20 703 409600
320129187 barghav245 C1 May 17, 2025, 4:41 p.m. OK Python 3 TESTS 20 703 409600
320128631 ali161102 C1 May 17, 2025, 4:40 p.m. OK Python 3 TESTS 20 734 409600
320140199 Divyanshu_81 C1 May 17, 2025, 6:14 p.m. OK Python 3 TESTS 20 749 512000
320129880 Stephen-S C1 May 17, 2025, 4:43 p.m. OK Python 3 TESTS 20 749 512000
320129837 kitkat.lover C1 May 17, 2025, 4:42 p.m. OK Python 3 TESTS 20 750 409600
320132689 bikkygill C1 May 17, 2025, 4:47 p.m. OK Python 3 TESTS 20 796 512000
320165417 silicalet C1 May 18, 2025, 1:27 a.m. OK Rust 2021 TESTS 20 281 0
320149171 0x81 C1 May 17, 2025, 7:28 p.m. OK Rust 2021 TESTS 20 390 0

remove filters

Back to search problems