Right Triangles
CodeChefOpen on judge ↗
Given N points in 2D plane, you have to calculate the number of right triangles, with their shorter sides parallel to the coordinate axis, that can be formed using these N points. Input/Output You don't have to read or write anything from/to stdin and stdout respectively. Use the template code provided in the editor on the submission page, that does the IO for you. In the template, you have to
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