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 |
---|---|---|---|---|---|---|
1887 | Codeforces Round 905 (Div. 1) | FINISHED | False | 7200 | 39207263 | Oct. 22, 2023, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 391 ) | E | Good Colorings | PROGRAMMING | binary search constructive algorithms graphs interactive |
B'Alice suggested Bob to play a game. Bob didn 't like this idea, but he couldn 't refuse Alice, so he asked you to write a program that would play instead of him. The game starts with Alice taking out a grid sheet of size n x n , the cells of which are initially not colored. After that she colors some 2n cells with colors 1,2, ldots, 2n , respectively, and informs Bob about these cells. In one move, Bob can point to a cell that has not been colored yet and ask Alice to color that cell. Alice colors that cell with one of the 2n colors of her choice, informing Bob of the chosen color. Bob can make no more than 10 moves, after which he needs to find a good set of four cells. A set of four cells is considered good if the following conditions are met: Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 200 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 3 <= n <= 1000 ) -- the size of the grid. The i -th of the following 2n lines contains two integers x_i and y_i ( 1 <= x_i, y_i <= n ) -- the coordinates of the cell colored with the i -th color. It is guaranteed that all coordinates (x_i, y_i) are pairwise distinct for the same test case. After reading the input data for each test case, continue the interaction as described below. You can make no more than 10 moves. To make a move, output "? x y " ( 1 <= q x,y <= q n ). In response to this, the jury 's program will output a single integer from 1 to 2n -- the color of cell (x,y) . After all moves (it is not necessary to make all 10 moves and it is not necessary to make at least one move), output a string in the format "! x_1 x_2 y_1 y_2 " ( 1 <= q x_1, x_2, y_1, y_2 <= q n, x_1 ne x_2, y_1 ne y_2 ). If cells '... |
Codeforces Round #905 (Div. 1, Div. 2, Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
229358550 | Leasier | E | Oct. 23, 2023, 1:38 a.m. | OK | GNU C++14 | TESTS | 8 | 795 | 16281600 | ||
229286116 | Roundgod | E | Oct. 22, 2023, 1:01 p.m. | OK | GNU C++17 | TESTS | 8 | 171 | 2662400 | ||
229258700 | Um_nik | E | Oct. 22, 2023, 12:18 p.m. | OK | GNU C++17 | TESTS | 8 | 202 | 1740800 | ||
229270583 | Swistakk | E | Oct. 22, 2023, 12:37 p.m. | OK | GNU C++17 | TESTS | 8 | 295 | 1228800 | ||
229271763 | zh0ukangyang | E | Oct. 22, 2023, 12:39 p.m. | OK | GNU C++17 | TESTS | 8 | 296 | 62668800 | ||
229286467 | alireza_kaviani | E | Oct. 22, 2023, 1:01 p.m. | OK | GNU C++17 | TESTS | 8 | 343 | 38502400 | ||
229359759 | Pointy | E | Oct. 23, 2023, 2:03 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 140 | 17203200 | ||
229275116 | 998batrr | E | Oct. 22, 2023, 12:44 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 217 | 34918400 | ||
229283031 | gisp_zjz | E | Oct. 22, 2023, 12:57 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 233 | 5222400 | ||
229293616 | tute7627 | E | Oct. 22, 2023, 1:51 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 311 | 819200 | ||
229294721 | tute7627 | E | Oct. 22, 2023, 1:55 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 312 | 819200 | ||
229293186 | dXqwq | E | Oct. 22, 2023, 1:49 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 343 | 18329600 | ||
229299247 | Kubic | E | Oct. 22, 2023, 2:18 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 421 | 18329600 | ||
229352089 | chappy1 | E | Oct. 22, 2023, 10:26 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 733 | 37376000 | ||
229297774 | Crystally | E | Oct. 22, 2023, 2:10 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 780 | 37376000 | ||
229363648 | wsyear | E | Oct. 23, 2023, 3:20 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 826 | 1331200 | ||
229253684 | jiangly | E | Oct. 22, 2023, 12:10 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 155 | 512000 | ||
229371407 | yingxue | E | Oct. 23, 2023, 5:27 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 155 | 17203200 | ||
229253935 | i_will_be_less_than_blue | E | Oct. 22, 2023, 12:11 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 156 | 17305600 | ||
229368462 | AmirAli-Asgari | E | Oct. 23, 2023, 4:46 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 156 | 18227200 | ||
229338891 | ecnerwala | E | Oct. 22, 2023, 8 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 171 | 409600 | ||
229329580 | A_G | E | Oct. 22, 2023, 6:24 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 171 | 409600 | ||
229356213 | xukai | E | Oct. 23, 2023, 12:36 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 171 | 5222400 | ||
229293509 | youbot | E | Oct. 22, 2023, 1:51 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 186 | 57548800 | ||
229355406 | neal | E | Oct. 23, 2023, 12:12 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 202 | 409600 | ||
229282090 | 244mhq | E | Oct. 22, 2023, 12:55 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 202 | 17408000 | ||
229352292 | arvindf232 | E | Oct. 22, 2023, 10:31 p.m. | OK | Kotlin 1.6 | TESTS | 8 | 498 | 1228800 | ||
229293778 | sansen | E | Oct. 22, 2023, 1:51 p.m. | OK | Rust 2021 | TESTS | 8 | 264 | 1228800 |
Back to search problems