아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

convex4gon

면접 대비

시간 제한2초메모리 제한1024 MB

요약
주어진 점 집합에서 네 점을 골라 만들 수 있는 볼록 사각형의 개수를 센다. 세 점이 한 직선 위에 있는 경우는 없다.
난이도

보통10점 중 6점

유형
기하, 조합론, 완전 탐색
정답자
아직 제출이 없습니다

문제

There is a point set of nn distinct points on the xyxy-plane. (0\<n<300\<n<30) Every xx- and yy-coordinate is an integer whose absolute value is less than 10001000. 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 object L of length nn representing the point set

    • Each item of L represents a point from the point set, as a tuple of its xx- and yy-coordinates.
    • Each item of L is a tuple-type object of length 2 whose items are int-type objects.
  • return value: the int-type object representing the number of the distinct convex quadrilaterals whose vertices are from the point set

예제

이 문제는 공개된 예제가 없습니다.