Codeforces Round 1046 (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
2135 Codeforces Round 1046 (Div. 1) FINISHED False 10800 20013923 Aug. 28, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 7299 ) B For the Champion PROGRAMMING constructive algorithms interactive math

This is an interactive problem. The RiOI team is hosting a robot championship! This time, your robot is teleported into an infinite 2D plane with the Cartesian coordinate system on it. There are (n) anchor points on the plane, and the coordinates of the (i)-th anchor point are ((x_i, y_i)) ((-10^9\le x_i,y_i\le 10^9)). These are given to your robot by the jury as soon as it is teleported into the plane. However, your robot doesn't know its initial coordinates at first. To test the IQ of your robot, the RiOI team has come up with an interesting game. Your robot needs to find out the initial coordinates ((X, Y)) ((-10^9\le X, Y\le 10^9)) by making the following moves. In one move, assuming that its current coordinates are ((a,b)), your robot can choose a non-negative integer (k) ((0\le k\le 10^9)) and do one of the following four types of operations: Move up by (k) units, i.e., your robot will move to ((a,b+k)); Move down by (k) units, i.e., your robot will move to ((a,b-k)); Move left by (k) units, i.e., your robot will move to ((a-k,b)); Move right by (k) units, i.e., your robot will move to ((a+k,b)). After each move, the jury will give the minimum Manhattan Distance between the current coordinates of your robot and any anchor point. More formally, assuming that the coordinates of your robot are ((c,d)) after the move, the jury will output () \min_{1\le i\le n}\left ( \left|x_i-c\right|+\left|y_i-d\right|\right ). () To win the prize, you must prove that your robot has a high IQ. So you have to write a program for your robot to find its initial coordinates ((X, Y)) in no more than (10) moves. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((1\le n\le 100)) — the number of anchor poin

Tutorials

Codeforces Round 1046 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
335980687 og.kostya B Aug. 28, 2025, 3:14 p.m. OK C# 10 TESTS 10 109 3174400
335970804 -firefly- B Aug. 28, 2025, 3:03 p.m. OK C# 13 TESTS 10 124 102400
336073567 kangleni B Aug. 29, 2025, 2:32 a.m. OK C++17 (GCC 7-32) TESTS 10 61 0
336069432 Phyus003 B Aug. 29, 2025, 1:17 a.m. OK C++17 (GCC 7-32) TESTS 10 61 0
336034951 bindpankaj B Aug. 28, 2025, 5:09 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335992159 grottenolm B Aug. 28, 2025, 3:31 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335989032 11231123 B Aug. 28, 2025, 3:26 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335985342 Az3ar B Aug. 28, 2025, 3:21 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335981421 SoReMore B Aug. 28, 2025, 3:15 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335959486 mickeyjung B Aug. 28, 2025, 2:51 p.m. OK C++17 (GCC 7-32) TESTS 10 61 0
335994080 marseille B Aug. 28, 2025, 3:34 p.m. OK C++17 (GCC 7-32) TESTS 10 61 102400
336078977 1.b3 B Aug. 29, 2025, 3:53 a.m. OK C++17 (GCC 7-32) TESTS 10 62 0
335955917 Kapt B Aug. 28, 2025, 2:48 p.m. OK C++20 (GCC 13-64) TESTS 10 46 0
335954267 EasonTAO B Aug. 28, 2025, 2:46 p.m. OK C++20 (GCC 13-64) TESTS 10 46 0
335983575 disastah B Aug. 28, 2025, 3:18 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3174400
335975747 oqmsac B Aug. 28, 2025, 3:08 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3174400
336067715 Gold14526 B Aug. 29, 2025, 12:32 a.m. OK C++20 (GCC 13-64) TESTS 10 61 0
335995343 ShmilyTY B Aug. 28, 2025, 3:37 p.m. OK C++20 (GCC 13-64) TESTS 10 61 0
335994325 555105 B Aug. 28, 2025, 3:35 p.m. OK C++20 (GCC 13-64) TESTS 10 61 0
335978805 positive_deviation B Aug. 28, 2025, 3:12 p.m. OK C++20 (GCC 13-64) TESTS 10 61 0
335964441 FizzyDavid B Aug. 28, 2025, 2:56 p.m. OK C++20 (GCC 13-64) TESTS 10 61 0
335962466 Xylenox B Aug. 28, 2025, 2:54 p.m. OK C++20 (GCC 13-64) TESTS 10 61 0
336081469 crocell001 B Aug. 29, 2025, 4:31 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
335986198 JoeyJ B Aug. 28, 2025, 3:22 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
335973923 kmjp B Aug. 28, 2025, 3:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
335949763 Kevin114514 B Aug. 28, 2025, 2:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
335958129 PinkieRabbit B Aug. 28, 2025, 2:50 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 16076800
336084984 pranav8055 B Aug. 29, 2025, 5:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 61 0
336076197 wangzqh B Aug. 29, 2025, 3:12 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 61 0
336074072 AkShukla B Aug. 29, 2025, 2:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 61 0
336069700 Happiness_3 B Aug. 29, 2025, 1:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 61 0
336066198 partylooper_ B Aug. 28, 2025, 11:44 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 61 0
335955825 hos.lyric B Aug. 28, 2025, 2:48 p.m. OK D TESTS 10 62 0
335978122 pengin_2000 B Aug. 28, 2025, 3:11 p.m. OK GNU C11 TESTS 10 77 8396800
335993967 yehara B Aug. 28, 2025, 3:34 p.m. OK Java 21 TESTS 10 358 1331200
335981448 Quasicoherent B Aug. 28, 2025, 3:15 p.m. OK Java 21 TESTS 10 374 1228800
335969744 Sincerely_yours B Aug. 28, 2025, 3:01 p.m. OK Kotlin 1.9 TESTS 10 218 0
335960036 Tlatoani B Aug. 28, 2025, 2:52 p.m. OK Kotlin 2.2 TESTS 10 218 204800
335967999 Ayis137 B Aug. 28, 2025, 3 p.m. OK PyPy 3-64 TESTS 10 140 2150400
336004594 monocrap B Aug. 28, 2025, 3:55 p.m. OK PyPy 3-64 TESTS 10 155 2867200
335998222 eepsilon B Aug. 28, 2025, 3:42 p.m. OK PyPy 3-64 TESTS 10 155 3072000
336019711 VitalyKo B Aug. 28, 2025, 4:29 p.m. OK PyPy 3-64 TESTS 10 155 4096000
335994913 titia B Aug. 28, 2025, 3:36 p.m. OK PyPy 3-64 TESTS 10 156 2150400
335981974 stan23456 B Aug. 28, 2025, 3:16 p.m. OK PyPy 3-64 TESTS 10 156 2355200
336027344 fatalerror B Aug. 28, 2025, 4:48 p.m. OK PyPy 3-64 TESTS 10 156 2764800
335980428 34z12000 B Aug. 28, 2025, 3:14 p.m. OK PyPy 3-64 TESTS 10 156 2764800
335954365 bribritt B Aug. 28, 2025, 2:46 p.m. OK PyPy 3-64 TESTS 10 171 3481600
335972535 alexwice B Aug. 28, 2025, 3:04 p.m. OK PyPy 3-64 TESTS 10 171 3686400
335971608 vit_72 B Aug. 28, 2025, 3:03 p.m. OK Python 3 TESTS 10 109 204800
335957673 Sugar_fan B Aug. 28, 2025, 2:49 p.m. OK Rust 2021 TESTS 10 93 0
335988377 darkkcyan B Aug. 28, 2025, 3:25 p.m. OK Rust 2024 TESTS 10 77 0

remove filters

Back to search problems