NOI Contest Archive

Archive / 2020 / May 2020

Largest Polygon

Medium · National Olympiad in Informatics Sri Lanka - May 2020

You are given a set of N points in the XY plane. There are many ways to make polygons (both concave and convex) in the XY plane connecting a subset of these points.
You have to select a subset from the given coordinates so that you can maximize the area of the polygon to find the largest polygon. Your task is to output the number of sides of this largest polygon.

Input Format

First line contains a single integer N, the number of coordinates
N lines follow, with i th of them having 2 integers, xi , yi , the x & y coordinates of the i th point

Output Format

A single integer, the number of sides in the largest polygon.

Constraints

Limits

Sample Input 0

5
2 2
0 2
1 1
0 0
2 0

Sample Output 0

4

Sample Input 1

10
0 2
1 2
2 1
0 1
1 1
2 2
3 1
0 0
1 0
2 0

Sample Output 1

5