测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A11079. Five Dimensional Points

编程题 普及/提高-

题目描述

You are given set of $n$ points in 5-dimensional space. The points are labeled from $1$ to $n$ . No two points coincide.

We will call point $a$ bad if there are different points $b$ and $c$ , not equal to $a$ , from the given set such that angle between vectors ![](/uploads/luogu/CF850A/0653dbc57091409c95cbdb75a14170af617d0442_4b63a66b3d55.png) and ![](/uploads/luogu/CF850A/bde2e95036e34134c1ea6bd6b9709d7dd49d1b09_2c6f04a1a32c.png) is acute (i.e. strictly less than ![](/uploads/acgo/image/fddeb56b134a76fb_03c7769aa709.jpeg)). Otherwise, the point is called good.

The angle between vectors ![](/uploads/acgo/image/36158e8e8ebbde73_fe7fe8a550b8.jpeg) and ![](/uploads/luogu/CF850A/2c10c8fe0b4dfc279c1514830bc9fce0b1aa6b49_50fb9fc76389.png) in 5-dimensional space is defined as ![](/uploads/luogu/CF850A/d27dbfc0849680d0f326c5cde0af47140b2f6df3_72bdf64f9fb9.png), where ![](/uploads/luogu/CF850A/0fea22328d6b3b4c1d11529ba4c9764cafce84d3_9e9fc6d0f7c9.png) is the scalar product and ![](/uploads/luogu/CF850A/f06b81b731bd497af38154f7447638a84ce787f2_3e79b2e412fd.png) is length of ![](/uploads/acgo/image/36158e8e8ebbde73_fe7fe8a550b8.jpeg).

Given the list of points, print the indices of the good points in ascending order.

输入格式

The first line of input contains a single integer $n$ ( $1<=n<=10^{3}$ ) — the number of points.

The next $n$ lines of input contain five integers $a_{i},b_{i},c_{i},d_{i},e_{i}$ ( $|a_{i}|,|b_{i}|,|c_{i}|,|d_{i}|,|e_{i}|<=10^{3}$ ) — the coordinates of the i-th point. All points are distinct.

输出格式

First, print a single integer $k$ — the number of good points.

Then, print $k$ integers, each on their own line — the indices of the good points in ascending order.

输入输出样例

输入 #1
6
0 0 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
输出 #1
1
1
输入 #2
3
0 0 1 2 0
0 0 9 2 0
0 0 5 9 0
输出 #2
0

说明/提示

In the first sample, the first point forms exactly a ![](/uploads/acgo/image/d302490f04fef3c8_efea906346a7.jpeg) angle with all other pairs of points, so it is good.

In the second sample, along the cd plane, we can see the points look as follows:

![](/uploads/acgo/image/2e16113cf6b3c8eb_a6c7dda8b8b2.jpeg)

We can see that all angles here are acute, so no points are good.
上一题 去做题 下一题