Counting Triangles
CodeChefOpen on judge ↗
125 POINTS You are given N points with non-negative integer x and y-coordinates. Your task is to count the num- ber of right-angled triangles that can be formed using these points as vertices such that one side of the triangle is parallel to the x-axis and another side is parallel to the y-axis. Input format The first line of input is an integer N, denoting the number of points. This is fo
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start