convex4gon
면접 대비시간 제한2초메모리 제한1024 MB
주어진 점 집합에서 네 점을 골라 만들 수 있는 볼록 사각형의 개수를 센다. 세 점이 한 직선 위에 있는 경우는 없다.
문제
There is a point set of distinct points on the -plane. () Every - and -coordinate is an integer whose absolute value is less than . No three distinct points from the point set lie on the same line. We want to count the number of the distinct convex quadrilaterals whose vertices are from the point set.
Write a function convex4gon:
-
input parameter: a
list-type objectLof length representing the point set- Each item of
Lrepresents a point from the point set, as a tuple of its - and -coordinates. - Each item of
Lis atuple-type object of length 2 whose items areint-type objects.
- Each item of
-
return value: the
int-type object representing the number of the distinct convex quadrilaterals whose vertices are from the point set
예제
이 문제는 공개된 예제가 없습니다.