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
( 92 ) E2 Game of Scientists (Version 2) PROGRAMMING brute force 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=3}), (\mathbf{c=2\cdot10^9})). 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 forget to

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
352264319 0wuming0 E2 Dec. 6, 2025, 1:42 p.m. OK C++20 (GCC 13-64) TESTS 14 156 0
352297520 VerweliuZ E2 Dec. 6, 2025, 5:52 p.m. OK C++20 (GCC 13-64) TESTS 14 593 102400
352267226 Rubikun E2 Dec. 6, 2025, 2:02 p.m. OK C++20 (GCC 13-64) TESTS 14 1140 409600
352267137 Rubikun E2 Dec. 6, 2025, 2:01 p.m. OK C++20 (GCC 13-64) TESTS 14 1875 409600
352260699 Dalek_of_Rivia E2 Dec. 6, 2025, 1:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 93 102400
352264853 platter E2 Dec. 6, 2025, 1:46 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 203 0
352263898 maspy E2 Dec. 6, 2025, 1:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 203 0
352263595 hanuta E2 Dec. 6, 2025, 1:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 234 0
352259615 mhb2010 E2 Dec. 6, 2025, 1:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 390 102400
352284669 seanlsy E2 Dec. 6, 2025, 4:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 656 921600
352274838 ogenus E2 Dec. 6, 2025, 2:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 968 409600
352263503 Dominater069 E2 Dec. 6, 2025, 1:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 14 1328 102400
352316148 alphaGem E2 Dec. 6, 2025, 9:06 p.m. OK PyPy 3-64 TESTS 14 625 16281600
352238306 Alex239 E2 Dec. 6, 2025, 10:10 a.m. OK PyPy 3-64 TESTS 14 1015 12390400

remove filters

Back to search problems