Problem C. Painting Cottages
Time Limit: 20 SecMemory Limit: 256 MB
题目连接
http://codeforces.com/gym/100342/attachments
Description
The new cottage settlement is organized near the capital of Flatland. The construction company that is building the settlement has decided to paint some cottages pink and others — light blue. However, they cannot decide which cottages must be painted which color. The director of the company claims that the painting is nice if there is at least one pink cottage, at least one light blue cottage, and it is possible to draw a straight line in such a way that pink cottages are at one side of the line, and light blue cottages are at the other side of the line (and no cottage is on the line itself). The main architect objects that there are several possible nice paintings.
Help them to find out how many different nice paintings are thereInput
The first line of the input file contains n — the number of the cottages (1 ≤ n ≤ 300). The following n lines contain the coordinates of the cottages — each line contains two integer numbers xi and yi (−104 ≤ xi , yi ≤ 104 ).
Output
Output one integer number — the number of different nice paintings of the cottages.
Sample Input
4
0 01 01 10 1Sample Output
12
HINT
题意
给你一个二维图,然后上面有几个点,然后让你用一条线把这些点分开,问你最多有多少种分开的方式
题解:
题意转化一下,就是这个n个点,能够连多少个不同的线段就好了,感觉是签到题……
数据范围才300
代码:
//qscqesze#include#include #include #include #include #include #include #include #include #include #include #include #include