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'You are given a set of n points on the plane. A line containing the origin is called good, if projection of the given set to this line forms a symmetric multiset of points. Find the total number of good lines. Multiset is a set where equal elements are allowed. Multiset is called symmetric, if there is a point P on the plane such that the multiset is centrally symmetric in respect of point P. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000) -- the number of points in the set. Each of the next n lines contains two integers xi and yi ( xe2 x80 x89- xe2 x80 x89106 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89xi, xe2 x80 x89 xe2 x80 x89yi xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89106) -- the coordinates of the points. It is guaranteed that no two points coincide. If there are infinitely many good lines, print -1. Otherwise, print single integer -- the number of good lines. Picture to the first sample test: In the second sample, any line containing the origin is good. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
32355371 |
ruban |
F |
Nov. 16, 2017, 12:50 p.m. |
OK |
Delphi |
TESTS |
51 |
780 |
148070400 |
|
2700 |
34080224 |
Worldwide_D |
F |
Jan. 11, 2018, 2:47 a.m. |
OK |
GNU C++ |
TESTS |
51 |
467 |
130867200 |
|
2700 |
41998238 |
alan_cty |
F |
Aug. 23, 2018, 1:25 p.m. |
OK |
GNU C++ |
TESTS |
51 |
1262 |
128819200 |
|
2700 |
45320988 |
Vexoben |
F |
Nov. 5, 2018, 10:35 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
202 |
32358400 |
|
2700 |
62186777 |
lzoiexplorer2004 |
F |
Oct. 9, 2019, 8:30 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
202 |
32460800 |
|
2700 |
45321106 |
Vexoben |
F |
Nov. 5, 2018, 10:39 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
218 |
32358400 |
|
2700 |
45324313 |
Apocrypha |
F |
Nov. 5, 2018, 12:09 p.m. |
OK |
GNU C++11 |
TESTS |
51 |
218 |
33792000 |
|
2700 |
45372804 |
CaptainSlow |
F |
Nov. 6, 2018, 10:51 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
233 |
25190400 |
|
2700 |
45343713 |
luogu_bot4 |
F |
Nov. 6, 2018, 12:12 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
234 |
0 |
|
2700 |
60905717 |
x_faraway_x |
F |
Sept. 20, 2019, 2:23 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
234 |
102400 |
|
2700 |
32320693 |
krijgertje |
F |
Nov. 14, 2017, 9:32 p.m. |
OK |
GNU C++11 |
TESTS |
51 |
234 |
204800 |
|
2700 |
45316323 |
Rebirth_A |
F |
Nov. 5, 2018, 8:14 a.m. |
OK |
GNU C++11 |
TESTS |
51 |
234 |
1843200 |
|
2700 |
45375634 |
chc_1234567890 |
F |
Nov. 6, 2018, 12:12 p.m. |
OK |
GNU C++11 |
TESTS |
51 |
249 |
0 |
|
2700 |
40979237 |
ReaLNero1 |
F |
July 30, 2018, 4:59 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
31 |
204800 |
|
2700 |
48772678 |
black_horse2014 |
F |
Jan. 23, 2019, 1:40 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
46 |
409600 |
|
2700 |
45314167 |
tqdtmx |
F |
Nov. 5, 2018, 6:58 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
171 |
16281600 |
|
2700 |
45315948 |
Hades18 |
F |
Nov. 5, 2018, 8:03 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
202 |
32256000 |
|
2700 |
45316134 |
SKT-T1_Faker |
F |
Nov. 5, 2018, 8:09 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
233 |
33996800 |
|
2700 |
52593884 |
emoairx |
F |
April 11, 2019, 7:41 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
234 |
102400 |
|
2700 |
36794093 |
chrisfsj2051 |
F |
April 1, 2018, 9:31 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
249 |
3379200 |
|
2700 |
33744868 |
gaoadt |
F |
Dec. 28, 2017, 7:47 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
249 |
34201600 |
|
2700 |
32354767 |
BULATT |
F |
Nov. 16, 2017, 12:24 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
265 |
409600 |
|
2700 |
32433221 |
Lagrang3 |
F |
Nov. 18, 2017, 2:04 p.m. |
OK |
GNU C++14 |
TESTS |
51 |
265 |
2150400 |
|
2700 |
45409936 |
Chuzyh |
F |
Nov. 7, 2018, 11:37 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
249 |
307200 |
|
2700 |
45320808 |
Vexoben |
F |
Nov. 5, 2018, 10:30 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
280 |
48742400 |
|
2700 |
45320834 |
Vexoben |
F |
Nov. 5, 2018, 10:31 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
296 |
48742400 |
|
2700 |
45314349 |
DOlaBMOon |
F |
Nov. 5, 2018, 7:05 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
296 |
65843200 |
|
2700 |
45316435 |
ffffxk |
F |
Nov. 5, 2018, 8:17 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
312 |
307200 |
|
2700 |
61099692 |
vjudge2 |
F |
Sept. 23, 2019, 6:01 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
421 |
204800 |
|
2700 |
45316470 |
cxt |
F |
Nov. 5, 2018, 8:18 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
561 |
409600 |
|
2700 |
45353225 |
FarmerJohn |
F |
Nov. 6, 2018, 7:50 a.m. |
OK |
GNU C++17 |
TESTS |
51 |
998 |
128921600 |
|
2700 |
32283009 |
Gold_Ryan |
F |
Nov. 13, 2017, 11:52 a.m. |
OK |
Java 8 |
TESTS |
51 |
1996 |
0 |
|
2700 |
32282072 |
mmaxio |
F |
Nov. 13, 2017, 11:09 a.m. |
OK |
Java 8 |
TESTS |
51 |
1996 |
0 |
|
2700 |
32380927 |
Maffka |
F |
Nov. 17, 2017, 2:15 p.m. |
OK |
MS C++ |
TESTS |
51 |
312 |
102400 |
|
2700 |
remove filters
Back to search problems