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 |
| 771
|
VK Cup 2017 - Round 1 |
FINISHED |
False |
7200 |
286554323 |
March 18, 2017, 3:35 p.m. |
Problems
Bearland is a big square on the plane. It contains all points with coordinates not exceeding 10 6 by the absolute value. There are n houses in Bearland. The i -th of them is located at the point ( x i , y i ) . The n points are distinct, but some subsets of them may be collinear. Bear Limak lives in the first house. He wants to destroy his house and build a new one somewhere in Bearland. Bears don't like big changes. For every three points (houses) p i , p j and p k , the sign of their cross product ( p j - p i ) × ( p k - p i ) should be the same before and after the relocation. If it was negative/positive/zero, it should still be negative/positive/zero respectively. This condition should be satisfied for all triples of indices ( i , j , k ) , possibly equal to each other or different than 1 . Additionally, Limak isn't allowed to build the house at the point where some other house already exists (but it can be the point where his old house was). In the formula above, we define the difference and the cross product of points ( a x , a y ) and ( b x , b y ) as: Consider a set of possible new placements of Limak's house. Your task is to find the area of that set of points. Formally, let's say that Limak chooses the new placement randomly (each coordinate is chosen independently uniformly at random from the interval - 10 6 , 10 6 ). Let p denote the probability of getting the allowed placement of new house. Let S denote the area of Bearland ( S = 4·10 12 ). Your task is to find p · S . The first line of the input contains an integer T ( 1 ≤ T ≤ 500 ) — the number of test cases. The description of the test cases follows. The first line of the description of a test case contains an integer n ( 3 ≤ n ≤ 200 000 ) — the number of houses. The i -th of the next n lines contains two integers x i and y i ( - 10 6 ≤ x i , y i ≤ 10 6 ) — coordinates of the i -th house. No two houses are located at the same point in the same test case. Limak lives in the first house. |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
42269040 |
luogu_bot2 |
F |
Aug. 30, 2018, 7:08 a.m. |
OK |
GNU C++ |
TESTS |
68 |
249 |
30515200 |
|
3200 |
|
34196536 |
XingGeRuCi |
F |
Jan. 15, 2018, 12:30 p.m. |
OK |
GNU C++ |
TESTS |
68 |
327 |
61235200 |
|
3200 |
|
25865624 |
namingwtf |
F |
March 28, 2017, 5:29 a.m. |
OK |
GNU C++ |
TESTS |
68 |
733 |
113152000 |
|
3200 |
|
25865596 |
vjudge2 |
F |
March 28, 2017, 5:27 a.m. |
OK |
GNU C++ |
TESTS |
68 |
733 |
113152000 |
|
3200 |
|
25678044 |
stczhc |
F |
March 20, 2017, 11:30 p.m. |
OK |
GNU C++ |
TESTS |
68 |
1918 |
34201600 |
|
3200 |
|
36221498 |
DZYO |
F |
March 12, 2018, 11:17 a.m. |
OK |
GNU C++11 |
TESTS |
68 |
234 |
32665600 |
|
3200 |
|
25723100 |
krijgertje |
F |
March 22, 2017, 10:33 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
265 |
53760000 |
|
3200 |
|
25712642 |
chenxun |
F |
March 22, 2017, 1:29 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
358 |
213504000 |
|
3200 |
|
25817543 |
Anusing1337 |
F |
March 26, 2017, 11:29 a.m. |
OK |
GNU C++11 |
TESTS |
68 |
389 |
76800000 |
|
3200 |
|
27186846 |
aid |
F |
May 17, 2017, 8:56 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
389 |
81817600 |
|
3200 |
|
34118192 |
samjia2000 |
F |
Jan. 13, 2018, 3:58 a.m. |
OK |
GNU C++11 |
TESTS |
68 |
405 |
62976000 |
|
3200 |
|
27182718 |
aid |
F |
May 17, 2017, 3:25 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
421 |
81817600 |
|
3200 |
|
25712813 |
chenxun |
F |
March 22, 2017, 1:35 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
421 |
213504000 |
|
3200 |
|
26160460 |
aid |
F |
April 6, 2017, 12:38 a.m. |
OK |
GNU C++11 |
TESTS |
68 |
483 |
65740800 |
|
3200 |
|
34801847 |
zhouyuyang |
F |
Feb. 1, 2018, 12:19 p.m. |
OK |
GNU C++11 |
TESTS |
68 |
561 |
178380800 |
|
3200 |
|
30095231 |
zigui |
F |
Sept. 5, 2017, 9:16 a.m. |
OK |
GNU C++14 |
TESTS |
68 |
187 |
27443200 |
|
3200 |
|
30206831 |
zigui |
F |
Sept. 8, 2017, 3:59 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
218 |
27443200 |
|
3200 |
|
30203657 |
zigui |
F |
Sept. 8, 2017, 1:48 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
218 |
28057600 |
|
3200 |
|
40982350 |
ReaLNero1 |
F |
July 30, 2018, 6:23 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
233 |
28057600 |
|
3200 |
|
25712673 |
apiadu |
F |
March 22, 2017, 1:30 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
296 |
213504000 |
|
3200 |
|
25627924 |
KAN |
F |
March 18, 2017, 7:34 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
343 |
34816000 |
|
3200 |
|
35588680 |
thhyj |
F |
Feb. 23, 2018, 5:19 a.m. |
OK |
GNU C++14 |
TESTS |
68 |
420 |
105267200 |
|
3200 |
|
35588649 |
thhyj |
F |
Feb. 23, 2018, 5:16 a.m. |
OK |
GNU C++14 |
TESTS |
68 |
436 |
105267200 |
|
3200 |
|
25678482 |
Philipsweng |
F |
March 21, 2017, 12:48 a.m. |
OK |
GNU C++14 |
TESTS |
68 |
483 |
75673600 |
|
3200 |
|
25621796 |
Zlobober zemen |
F |
March 18, 2017, 5:11 p.m. |
OK |
GNU C++14 |
TESTS |
68 |
514 |
71168000 |
|
3200 |
|
69940418 |
gongsuidashen |
F |
Feb. 1, 2020, 5:57 a.m. |
OK |
GNU C++17 |
TESTS |
68 |
420 |
51712000 |
|
3200 |
|
63245798 |
112 |
F |
Oct. 23, 2019, 2:37 p.m. |
OK |
GNU C++17 |
TESTS |
68 |
1419 |
48025600 |
|
3200 |
|
63245538 |
112 |
F |
Oct. 23, 2019, 2:34 p.m. |
OK |
GNU C++17 |
TESTS |
68 |
1497 |
80281600 |
|
3200 |
|
63245577 |
112 |
F |
Oct. 23, 2019, 2:34 p.m. |
OK |
GNU C++17 |
TESTS |
68 |
1544 |
48025600 |
|
3200 |
remove filters
Back to search problems