问题 B: Anticomplementary Triangle

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

链接:https://ac.nowcoder.com/acm/contest/57355/B
来源:牛客网
There are n points P1,P2,…,Pn in a plane forming a convex polygon. The coordinates of the i-th point Pi are (xi,yi). You need to find three pairwise distinct indices r,s,t∈{1,2,…,n}, such that there exists a triangle △ABC satisfying
  • △ABC is the anticomplementary triangle of △PrPsPt.
  • Pi is inside or on the edge of △ABC for all 1≤i≤n1.
△ABC is the anticomplementary triangle of △XYZ if X,Y,Z are the midpoints of edge BC,CA,AB respectively.

输入格式

The first line contains an integer n (3≤n≤106), indicating the number of points.
The i-th of the next n lines contains two integers xi and yi (∣xi∣,∣yi∣≤10^9), indicating the coordinates of Pi. The vertices are guaranteed to form a convex polygon, and are given in counterclockwise order.

输出格式

Output three integers r,s and t indicating the selected indices. If there are multiple solutions, print any of them. You can output r,s,t in an arbitrary order.

输入样例 复制

4
0 0
1 0
1 1
0 1

输出样例 复制

1 2 3

分类标签