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'A point belongs to a triangle if it lies inside the triangle or on one of its sides. Two triangles are disjoint if there is no point on the plane that belongs to both triangles. You are given n points on the plane. No two points coincide and no three points are collinear. Find the number of different ways to choose two disjoint triangles with vertices in the given points. Two ways which differ only in order of triangles or in order of vertices inside triangles are considered equal. The first line of the input contains an integer n ( 6 <= n <= 2000 ) xe2 x80 x93 the number of points. Each of the next n lines contains two integers x_i and y_i ( |x_i|, |y_i| <= 10^9 ) xe2 x80 x93 the coordinates of a point. No two points coincide and no three points are collinear. Print one integer xe2 x80 x93 the number of ways to choose two disjoint triangles. In the first example there are six pairs of disjoint triangles, they are shown on the picture below. All other pairs of triangles are not disjoint, for example the following pair: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
42001445 |
Ronnie007 |
F |
Aug. 23, 2018, 3:26 p.m. |
OK |
GNU C++ |
TESTS |
36 |
530 |
307200 |
|
2700 |
41999019 |
ljz |
F |
Aug. 23, 2018, 1:52 p.m. |
OK |
GNU C++ |
TESTS |
36 |
530 |
512000 |
|
2700 |
41857518 |
MarkF |
F |
Aug. 19, 2018, 3:10 p.m. |
OK |
GNU C++ |
TESTS |
36 |
545 |
0 |
|
2700 |
41863239 |
wzporz |
F |
Aug. 19, 2018, 3:41 p.m. |
OK |
GNU C++ |
TESTS |
36 |
545 |
102400 |
|
2700 |
41862454 |
smallest_ling |
F |
Aug. 19, 2018, 3:37 p.m. |
OK |
GNU C++ |
TESTS |
36 |
545 |
102400 |
|
2700 |
41881596 |
ppppaidy |
F |
Aug. 20, 2018, 1:55 a.m. |
OK |
GNU C++ |
TESTS |
36 |
546 |
102400 |
|
2700 |
41885089 |
williamswu2002 |
F |
Aug. 20, 2018, 3:06 a.m. |
OK |
GNU C++ |
TESTS |
36 |
561 |
102400 |
|
2700 |
42308936 |
nh_dantz |
F |
Aug. 31, 2018, 1:04 p.m. |
OK |
GNU C++ |
TESTS |
36 |
576 |
102400 |
|
2700 |
41919952 |
samjia2000 |
F |
Aug. 21, 2018, 3:03 a.m. |
OK |
GNU C++ |
TESTS |
36 |
577 |
102400 |
|
2700 |
41895556 |
HatsuneMikuo |
F |
Aug. 20, 2018, 9:15 a.m. |
OK |
GNU C++ |
TESTS |
36 |
608 |
204800 |
|
2700 |
42696066 |
ReaLNero1 |
F |
Sept. 9, 2018, 7:13 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
327 |
50483200 |
|
2700 |
41859081 |
laurageorgescu |
F |
Aug. 19, 2018, 3:18 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
358 |
50483200 |
|
2700 |
42326226 |
Panole2333 |
F |
Sept. 1, 2018, 5:48 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
374 |
64819200 |
|
2700 |
41956819 |
FizzyDavicl |
F |
Aug. 22, 2018, 7:07 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
374 |
64819200 |
|
2700 |
42285961 |
Twenty_Fifteen |
F |
Aug. 30, 2018, 5:14 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
390 |
102400 |
|
2700 |
55072301 |
shuashuawan |
F |
June 4, 2019, 6:52 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
405 |
129024000 |
|
2700 |
68447310 |
changle_cyx |
F |
Jan. 9, 2020, 1:09 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
421 |
204800 |
|
2700 |
45988341 |
liumh8 |
F |
Nov. 20, 2018, 8:12 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
436 |
102400 |
|
2700 |
50569700 |
luogu_bot4 |
F |
Feb. 27, 2019, 2:47 p.m. |
OK |
GNU C++11 |
TESTS |
36 |
452 |
0 |
|
2700 |
47383866 |
Dust1404 |
F |
Dec. 23, 2018, 1:50 a.m. |
OK |
GNU C++11 |
TESTS |
36 |
468 |
0 |
|
2700 |
41887089 |
193s |
F |
Aug. 20, 2018, 4:39 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
280 |
50483200 |
|
2700 |
55858622 |
Scut82 |
F |
June 21, 2019, 8:22 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
327 |
64307200 |
|
2700 |
41905443 |
gasin |
F |
Aug. 20, 2018, 2:21 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
358 |
102400 |
|
2700 |
41892156 |
xy961218 |
F |
Aug. 20, 2018, 7:41 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
405 |
0 |
|
2700 |
50677792 |
Limeni |
F |
March 2, 2019, 10:01 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
405 |
102400 |
|
2700 |
42213144 |
radoslav11 |
F |
Aug. 28, 2018, 3:31 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
405 |
50483200 |
|
2700 |
42107610 |
black_horse2014 |
F |
Aug. 26, 2018, 2:41 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
421 |
0 |
|
2700 |
54330412 |
lxy_sheep |
F |
May 18, 2019, 5:34 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
421 |
102400 |
|
2700 |
42025678 |
songpengyu |
F |
Aug. 24, 2018, 12:19 p.m. |
OK |
GNU C++14 |
TESTS |
36 |
421 |
307200 |
|
2700 |
41892498 |
xy961218 |
F |
Aug. 20, 2018, 7:50 a.m. |
OK |
GNU C++14 |
TESTS |
36 |
436 |
0 |
|
2700 |
48080253 |
myx12345 |
F |
Jan. 8, 2019, 7:17 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
390 |
2048000 |
|
2700 |
43152414 |
harryoooooooooo |
F |
Sept. 20, 2018, 6:03 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
405 |
0 |
|
2700 |
45099249 |
BryantYm |
F |
Oct. 30, 2018, 1:09 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
420 |
307200 |
|
2700 |
42426777 |
yijianchi |
F |
Sept. 3, 2018, 1:01 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
421 |
307200 |
|
2700 |
42122992 |
vjudge2 |
F |
Aug. 26, 2018, 1:28 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
102400 |
|
2700 |
41927356 |
Dreamless_Dreams |
F |
Aug. 21, 2018, 8:11 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
102400 |
|
2700 |
41871628 |
_SOCIOPATH |
F |
Aug. 19, 2018, 6:42 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
102400 |
|
2700 |
41858319 |
Arturgo |
F |
Aug. 19, 2018, 3:14 p.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
204800 |
|
2700 |
42302541 |
dx007 |
F |
Aug. 31, 2018, 8:48 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
307200 |
|
2700 |
41879292 |
skxqks |
F |
Aug. 20, 2018, 12:10 a.m. |
OK |
GNU C++17 |
TESTS |
36 |
436 |
63180800 |
|
2700 |
41909652 |
profi |
F |
Aug. 20, 2018, 4:52 p.m. |
OK |
Java 8 |
TESTS |
36 |
857 |
0 |
|
2700 |
41874199 |
Egor |
F |
Aug. 19, 2018, 7:52 p.m. |
OK |
Java 8 |
TESTS |
36 |
951 |
0 |
|
2700 |
68021031 |
bking11 |
F |
Dec. 31, 2019, 11:02 p.m. |
OK |
Java 8 |
TESTS |
36 |
1107 |
0 |
|
2700 |
68020998 |
bking11 |
F |
Dec. 31, 2019, 10:59 p.m. |
OK |
Java 8 |
TESTS |
36 |
1138 |
0 |
|
2700 |
51954142 |
Ahmed_Diab |
F |
March 28, 2019, 11:40 p.m. |
OK |
Java 8 |
TESTS |
36 |
1231 |
0 |
|
2700 |
51953913 |
Ahmed_Diab |
F |
March 28, 2019, 11:20 p.m. |
OK |
Java 8 |
TESTS |
36 |
1263 |
0 |
|
2700 |
41955274 |
uwi |
F |
Aug. 22, 2018, 6:04 a.m. |
OK |
Java 8 |
TESTS |
36 |
1435 |
0 |
|
2700 |
41955237 |
uwi |
F |
Aug. 22, 2018, 6:02 a.m. |
OK |
Java 8 |
TESTS |
36 |
1481 |
0 |
|
2700 |
42148327 |
bsrkaditya |
F |
Aug. 27, 2018, 10:27 a.m. |
OK |
Java 8 |
TESTS |
36 |
1559 |
0 |
|
2700 |
42112118 |
tri |
F |
Aug. 26, 2018, 6:52 a.m. |
OK |
Java 8 |
TESTS |
36 |
1700 |
88473600 |
|
2700 |
41894300 |
lucyanna2018 |
F |
Aug. 20, 2018, 8:38 a.m. |
OK |
MS C++ |
TESTS |
36 |
1716 |
16384000 |
|
2700 |
56514693 |
st1vdy |
F |
July 4, 2019, 12:10 p.m. |
OK |
MS C++ 2017 |
TESTS |
36 |
592 |
9625600 |
|
2700 |
remove filters
Back to search problems