Codeforces Round 1069 (Div. 1)

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
2174 Codeforces Round 1069 (Div. 1) FINISHED False 7200 11396723 Dec. 6, 2025, 8:15 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 126 ) E1 Game of Scientists (Version 1) PROGRAMMING chinese remainder theorem interactive math

The two versions have different constraints on (k), (c). Solving one of the two versions does not necessarily solve the other. You may want to read both versions. Hacks are disabled in both versions. This is an interactive problem. During the time of the Ottoman Empire, many scientists were at work. You decided to study their daily life and stumbled upon an interesting game that was popular at that time. One scientist would think of an integer (x), such that (1 \leq x \leq c). Another scientist would try to guess it. He could specify the base of the numeral system (2 \leq b \leq c) and would receive as a response the sum of the digits of the number (x) in base (b), if (x \geq b), or (-1) if (x < b). You wrote a program that can think of a number (x) and respond to the question. Now you want to play with it and learn to guess using (\leq k) queries. The first line contains three integers (t), (k), (c) ((1 \leq t \leq 10^4), (\mathbf{k = 4}), (\mathbf{c = 4 \cdot 10^{18}})). You must guess the number from (1) to (c) (t) times, using (\leq k) queries. All (t) games will be played consecutively and are independent. To make a query, you must output ? (b) for some (2 \leq b \leq c). Then you must read the response — an integer (a) ((-1 \leq a < c)) — the response to the query. To provide the guessed number, you must output ! (x) , where (1 \leq x \leq c) — your answer. Then you must read the result (r) ((0 \leq r \leq 1)). If (r = 0) — your answer is incorrect, you must immediately terminate the program in this case. Otherwise, if (r = 1) — your answer is correct, you can proceed to the next game or terminate the program if (t) games have already been played. It is guaranteed that the interactor is not adaptive. That is, all chosen numbers are fixed in advance and do not change during the games. After printing each query do not

Tutorials

Codeforces Round 1069 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
352224916 littleju E1 Dec. 6, 2025, 9:31 a.m. OK C++17 (GCC 7-32) TESTS 16 187 102400
352335723 Sai_t E1 Dec. 7, 2025, 4:31 a.m. OK C++17 (GCC 7-32) TESTS 16 218 0
352281395 BurnedChicken E1 Dec. 6, 2025, 3:43 p.m. OK C++20 (GCC 13-64) TESTS 16 140 0
352265325 0wuming0 E1 Dec. 6, 2025, 1:49 p.m. OK C++20 (GCC 13-64) TESTS 16 187 102400
352333618 mxj_helen E1 Dec. 7, 2025, 3:57 a.m. OK C++20 (GCC 13-64) TESTS 16 218 80179200
352259084 Kawaii E1 Dec. 6, 2025, 1:09 p.m. OK C++20 (GCC 13-64) TESTS 16 250 102400
352225987 licn090605 E1 Dec. 6, 2025, 9:34 a.m. OK C++20 (GCC 13-64) TESTS 16 250 48128000
352267093 Rubikun E1 Dec. 6, 2025, 2:01 p.m. OK C++20 (GCC 13-64) TESTS 16 296 409600
352261346 Dalek_of_Rivia E1 Dec. 6, 2025, 1:23 p.m. OK C++23 (GCC 14-64, msys2) TESTS 16 93 0
352263530 CHYYYY E1 Dec. 6, 2025, 1:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 16 140 102400
352308852 risujiroh E1 Dec. 6, 2025, 7:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 16 156 102400
352239404 o7ro E1 Dec. 6, 2025, 10:13 a.m. OK C++23 (GCC 14-64, msys2) TESTS 16 171 0
352338601 liuxinrang2026 E1 Dec. 7, 2025, 5:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 16 171 102400
352238544 ballpoint_pen E1 Dec. 6, 2025, 10:11 a.m. OK C++23 (GCC 14-64, msys2) TESTS 16 187 0
352238411 Focalors E1 Dec. 6, 2025, 10:10 a.m. OK C++23 (GCC 14-64, msys2) TESTS 16 203 0
352261662 maspy E1 Dec. 6, 2025, 1:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 16 203 102400
352233003 Sept E1 Dec. 6, 2025, 9:54 a.m. OK C++23 (GCC 14-64, msys2) TESTS 16 234 0
352274768 ogenus E1 Dec. 6, 2025, 2:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 16 234 102400
352340344 diss_quack E1 Dec. 7, 2025, 5:38 a.m. OK PyPy 3-64 TESTS 16 671 9011200
352234807 Alex239 E1 Dec. 6, 2025, 10 a.m. OK PyPy 3-64 TESTS 16 1109 11161600
352230594 alexwice E1 Dec. 6, 2025, 9:47 a.m. OK PyPy 3-64 TESTS 16 1140 28160000

remove filters

Back to search problems