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.
Problems
B'This is an interactive problem. There are n distinct hidden points with real coordinates on a two-dimensional Euclidean plane. In one query, you can ask some line ax + by + c = 0 and get the projections of all n points to this line in some order. The given projections are not exact, please read the interaction section for more clarity. Using the minimum number of queries, guess all n points and output them in some order. Here minimality means the minimum number of queries required to solve any possible test case with n points. The hidden points are fixed in advance and do not change throughout the interaction. In other words, the interactor is not adaptive. A projection of point A to line ax + by + c = 0 is the point on the line closest to A . The first line contains a single integer t ( 1 <= q t <= q 50 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 25 ) -- the number of hidden points. For each test case, it is guaranteed that for any pair of hidden points, their x coordinates differ by at least 1 . Analogously, y coordinates of any pair also differ by at least 1 . Coordinates x and y of all hidden points do not exceed 100 by absolute value. To query a line ax + by + c = 0 you should print "? a b c" where all a, b and c are real numbers up to 100 by absolute value. For less precision issues numbers a and b must satisfy the condition |a| + |b| geq 0.1 , where |a| is the absolute value of a . As an answer to the query you will get n points in the form "x_1 y_1 ... x_n y_n", where points (x_i, y_i) are projections to the line ax + by + c = 0 . It is guaranteed that each printed point is no more than 10^{-4} away from the real projection point. Every coordinate is printed with at most 9'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
205628752 |
Pavan125 |
F |
May 12, 2023, 5:42 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
179 |
109 |
0 |
|
2800 |
204989282 |
bkifhr7 |
F |
May 7, 2023, 3:03 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
179 |
124 |
0 |
|
2800 |
205684985 |
zltzlt |
F |
May 13, 2023, 7:22 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
46 |
0 |
|
2800 |
205684926 |
zltzlt |
F |
May 13, 2023, 7:21 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
46 |
0 |
|
2800 |
205293194 |
Icedpiggy |
F |
May 10, 2023, 6:07 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
46 |
0 |
|
2800 |
205186288 |
roohaande |
F |
May 9, 2023, 5:33 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
77 |
409600 |
|
2800 |
205065734 |
kjhhjki |
F |
May 8, 2023, 9:53 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
77 |
409600 |
|
2800 |
206318125 |
soudhamini_2000031088 |
F |
May 18, 2023, 9:09 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
78 |
409600 |
|
2800 |
205530785 |
kunkun2007 |
F |
May 12, 2023, 11:47 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
78 |
409600 |
|
2800 |
205530775 |
kunkun2007 |
F |
May 12, 2023, 11:47 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
78 |
409600 |
|
2800 |
205416774 |
2000030309_geethika |
F |
May 11, 2023, 10:38 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
78 |
409600 |
|
2800 |
205408136 |
2000031863 |
F |
May 11, 2023, 9:07 a.m. |
OK |
GNU C++14 |
TESTS |
179 |
78 |
409600 |
|
2800 |
204951568 |
Timsei |
F |
May 7, 2023, 9:24 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
46 |
102400 |
|
2800 |
204951188 |
Timsei |
F |
May 7, 2023, 9:20 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
46 |
102400 |
|
2800 |
206019872 |
sridharsiddi |
F |
May 15, 2023, 6:30 p.m. |
OK |
GNU C++17 |
TESTS |
179 |
62 |
409600 |
|
2800 |
204955346 |
anikethend1234 |
F |
May 7, 2023, 9:57 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
62 |
409600 |
|
2800 |
205961839 |
Karthik1106 |
F |
May 15, 2023, 9:20 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
77 |
409600 |
|
2800 |
205076421 |
kjhhjki |
F |
May 8, 2023, 11:48 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
77 |
409600 |
|
2800 |
204985447 |
2000031605 |
F |
May 7, 2023, 2:29 p.m. |
OK |
GNU C++17 |
TESTS |
179 |
77 |
409600 |
|
2800 |
205412757 |
Weiqt |
F |
May 11, 2023, 9:54 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
78 |
204800 |
|
2800 |
205412358 |
Weiqt |
F |
May 11, 2023, 9:50 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
78 |
204800 |
|
2800 |
205410625 |
Weiqt |
F |
May 11, 2023, 9:33 a.m. |
OK |
GNU C++17 |
TESTS |
179 |
78 |
204800 |
|
2800 |
205740409 |
lgkm39 |
F |
May 13, 2023, 4:12 p.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
46 |
0 |
|
2800 |
205411912 |
vamsipalapati_15 |
F |
May 11, 2023, 9:46 a.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
77 |
0 |
|
2800 |
206430299 |
varma99 |
F |
May 19, 2023, 9:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
78 |
0 |
|
2800 |
205386912 |
chakravarthi_1 |
F |
May 11, 2023, 4:16 a.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
78 |
0 |
|
2800 |
204989295 |
21h51a6677 |
F |
May 7, 2023, 3:03 p.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
78 |
0 |
|
2800 |
205391645 |
Alex_Wei |
F |
May 11, 2023, 5:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
78 |
512000 |
|
2800 |
206390915 |
HassanKh2002 |
F |
May 18, 2023, 10:58 p.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
93 |
0 |
|
2800 |
206351886 |
PEKKA_l |
F |
May 18, 2023, 2:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
93 |
0 |
|
2800 |
206351835 |
PEKKA_l |
F |
May 18, 2023, 2:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
93 |
0 |
|
2800 |
206414272 |
Crystally |
F |
May 19, 2023, 7:10 a.m. |
OK |
GNU C++17 (64) |
TESTS |
179 |
93 |
102400 |
|
2800 |
205522031 |
fengzhengwei |
F |
May 12, 2023, 10:01 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
61 |
57241600 |
|
2800 |
205279944 |
F1L0N |
F |
May 10, 2023, 1:50 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
0 |
|
2800 |
205050860 |
hehezhoutxdy |
F |
May 8, 2023, 6:56 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
0 |
|
2800 |
205050805 |
dXqwq |
F |
May 8, 2023, 6:55 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
0 |
|
2800 |
204983853 |
X_o_r4 |
F |
May 7, 2023, 2:14 p.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
0 |
|
2800 |
205208872 |
Vercingetorix |
F |
May 9, 2023, 10:08 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
102400 |
|
2800 |
205208787 |
Vercingetorix |
F |
May 9, 2023, 10:08 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
62 |
102400 |
|
2800 |
205521994 |
fengzhengwei |
F |
May 12, 2023, 10:01 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
77 |
57241600 |
|
2800 |
205186271 |
MurphyUU |
F |
May 9, 2023, 5:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
78 |
0 |
|
2800 |
205068977 |
orz_z |
F |
May 8, 2023, 10:31 a.m. |
OK |
GNU C++20 (64) |
TESTS |
179 |
78 |
0 |
|
2800 |
205144543 |
2000030255 |
F |
May 8, 2023, 4:39 p.m. |
OK |
PyPy 3 |
TESTS |
179 |
202 |
4915200 |
|
2800 |
205678792 |
2000032077cse |
F |
May 13, 2023, 6:30 a.m. |
OK |
PyPy 3-64 |
TESTS |
179 |
171 |
6656000 |
|
2800 |
206285040 |
kost |
F |
May 17, 2023, 11:13 p.m. |
OK |
Rust 2021 |
TESTS |
179 |
1294 |
8396800 |
|
2800 |
remove filters
Back to search problems