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'Cirno gives AquaMoon a problem. There are m people numbered from 0 to m - 1 . They are standing on a coordinate axis in points with positive integer coordinates. They are facing right (i.e. in the direction of the coordinate increase). At this moment everyone will start running with the constant speed in the direction of coordinate increasing. The initial coordinate of the i -th person on the line is x_i , and the speed of the i -th person is v_i . So the coordinate of the i -th person at the moment t will be x_i + t cdot v_i . Cirno captured the coordinates of m people in k consecutive integer moments from 0 to k - 1 . In every moment, the coordinates of m people were recorded in arbitrary order. To make the problem more funny, Cirno modified one coordinate at the moment y ( 0 < y < k-1 ) to a different integer. AquaMoon wants to find the moment y and the original coordinate p before the modification. Actually, she is not a programmer at all. So she wasn 't able to solve it. Can you help her? This problem is made as interactive. It means, that your solution will read the input, given by the interactor. But the interactor will give you the full input at the beginning and after that, you should print the answer. So you should solve the problem, like as you solve the usual, non-interactive problem because you won 't have any interaction process. The only thing you should not forget is to flush the output buffer, after printing the answer. Otherwise, you can get an "Idleness limit exceeded" verdict. Refer to the interactive problems guide for the detailed information about flushing the output buffer. The first line contains two integers m and k ( 5 <= q m <= q 1000 , 7 <= q k <= q 1000 ) -- the number of people and the number of recorded moments. The next k lines contain captured positions. i -th of these lines contains m'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
122127527 |
Lidox1145143344 |
D |
July 11, 2021, 4:23 p.m. |
OK |
GNU C++11 |
TESTS |
182 |
77 |
7987200 |
|
3000 |
122157161 |
skydogli |
D |
July 12, 2021, 1:02 a.m. |
OK |
GNU C++11 |
TESTS |
182 |
78 |
11980800 |
|
3000 |
122107122 |
gisp_zjz |
D |
July 11, 2021, 3:13 p.m. |
OK |
GNU C++11 |
TESTS |
182 |
186 |
13824000 |
|
3000 |
122164242 |
zrmpaul |
D |
July 12, 2021, 3:24 a.m. |
OK |
GNU C++11 |
TESTS |
182 |
576 |
11980800 |
|
3000 |
122164222 |
paulzrm |
D |
July 12, 2021, 3:23 a.m. |
OK |
GNU C++11 |
TESTS |
182 |
576 |
11980800 |
|
3000 |
122109850 |
rsabcmoi |
D |
July 11, 2021, 3:21 p.m. |
OK |
GNU C++11 |
TESTS |
182 |
577 |
12492800 |
|
3000 |
122161868 |
SaInT7 |
D |
July 12, 2021, 2:42 a.m. |
OK |
GNU C++11 |
TESTS |
182 |
686 |
20172800 |
|
3000 |
122123526 |
gs12117 |
D |
July 11, 2021, 4:07 p.m. |
OK |
GNU C++14 |
TESTS |
182 |
218 |
7782400 |
|
3000 |
122112699 |
ugly2333 |
D |
July 11, 2021, 3:29 p.m. |
OK |
GNU C++14 |
TESTS |
182 |
233 |
8704000 |
|
3000 |
122169726 |
tzc_wk |
D |
July 12, 2021, 5:02 a.m. |
OK |
GNU C++14 |
TESTS |
182 |
233 |
24576000 |
|
3000 |
122101318 |
peehs_moorhsum |
D |
July 11, 2021, 2:59 p.m. |
OK |
GNU C++14 |
TESTS |
182 |
234 |
20070400 |
|
3000 |
122157614 |
guangmutianwang |
D |
July 12, 2021, 1:14 a.m. |
OK |
GNU C++14 |
TESTS |
182 |
249 |
11980800 |
|
3000 |
122169004 |
syksykCCC |
D |
July 12, 2021, 4:50 a.m. |
OK |
GNU C++14 |
TESTS |
182 |
264 |
11878400 |
|
3000 |
122117784 |
Radewoosh |
D |
July 11, 2021, 3:46 p.m. |
OK |
GNU C++14 |
TESTS |
182 |
265 |
7987200 |
|
3000 |
122111358 |
binsjl |
D |
July 11, 2021, 3:25 p.m. |
OK |
GNU C++14 |
TESTS |
182 |
280 |
11878400 |
|
3000 |
122136567 |
elbrunovsky |
D |
July 11, 2021, 5:55 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
202 |
8089600 |
|
3000 |
122137294 |
sd0061 |
D |
July 11, 2021, 6:04 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
217 |
7782400 |
|
3000 |
122135511 |
skywalkert |
D |
July 11, 2021, 5:45 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
217 |
7782400 |
|
3000 |
122116979 |
gabrielwu |
D |
July 11, 2021, 3:43 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
218 |
12492800 |
|
3000 |
122136910 |
sd0061 |
D |
July 11, 2021, 5:59 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
233 |
7782400 |
|
3000 |
122134782 |
iaNTU |
D |
July 11, 2021, 5:38 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
233 |
11980800 |
|
3000 |
122112155 |
xtqqwq |
D |
July 11, 2021, 3:28 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
234 |
3788800 |
|
3000 |
122121641 |
semiexp |
D |
July 11, 2021, 4 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
234 |
11878400 |
|
3000 |
122093535 |
tapir1729 |
D |
July 11, 2021, 2:42 p.m. |
OK |
GNU C++17 |
TESTS |
182 |
249 |
7782400 |
|
3000 |
122162458 |
leinad2 |
D |
July 12, 2021, 2:53 a.m. |
OK |
GNU C++17 |
TESTS |
182 |
249 |
11980800 |
|
3000 |
122090817 |
ecnerwala |
D |
July 11, 2021, 2:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
4300800 |
|
3000 |
122136456 |
Maksim1744 |
D |
July 11, 2021, 5:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
8806400 |
|
3000 |
122107428 |
jiangly |
D |
July 11, 2021, 3:14 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
8806400 |
|
3000 |
122160823 |
wty2016 |
D |
July 12, 2021, 2:24 a.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
12390400 |
|
3000 |
122117389 |
kefaa2 |
D |
July 11, 2021, 3:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
12390400 |
|
3000 |
122153360 |
cuiaoxiang |
D |
July 11, 2021, 10:49 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
12902400 |
|
3000 |
122152145 |
Bench0310 |
D |
July 11, 2021, 10:03 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
12902400 |
|
3000 |
122146273 |
aryanc403 |
D |
July 11, 2021, 8:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
155 |
12902400 |
|
3000 |
122164561 |
Bench0310 |
D |
July 12, 2021, 3:29 a.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
156 |
4300800 |
|
3000 |
122140314 |
Zap |
D |
July 11, 2021, 6:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
182 |
156 |
4300800 |
|
3000 |
122117591 |
clyring |
D |
July 11, 2021, 3:45 p.m. |
OK |
Haskell |
TESTS |
182 |
296 |
40038400 |
|
3000 |
122117239 |
Tlatoani |
D |
July 11, 2021, 3:44 p.m. |
OK |
Kotlin |
TESTS |
182 |
265 |
29900800 |
|
3000 |
remove filters
Back to search problems