این مسابقه به صورت حضوری در تاریخ ۱۴ آذر ۱۴۰۳ در سایت دانشکده برق و کامپیوتر دانشگاه تهران برگزار میشود. علاقهمندان میتوانند به صورت همزمان در مسابقه آنلاین که شامل همان سوالات میباشد شرکت کنند.
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.
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 the number of Orthogonal triangles.