- محدودیت زمان: ۴ ثانیه
- محدودیت حافظه: ۳۲ مگابایت
In a two-dimensional coordinate plane, there are N distinct points given as input, specified by their coordinates for . Your task is to develop a program that computes the number of unique Orthogonal (right) triangles that can be formed by selecting any three of the provided points.
An Orthogonal triangle is a triangle in which one of the angles measures exactly 90 degrees.
Input
The first line of input contains an integer N, the number of points.
Each of the following N lines contains the coordinates of one point, two integers separated by a space. No two points will be located at the same coordinates.
Output
Output the number of Orthogonal triangles.
Constrints
Sample Test Data
input 1
input 2
ارسال پاسخ برای این سؤال