Triangle
CodeChefOpen on judge ↗
Your are given sticks of different length and your task is to find the number of different triangle that can be formed from these sticks. Two triangles are considered to be similar if each of their corresponding sides is equal in length. If it is not possible to create any triangle then you should output 0. Note :The triangle inequality theorem states that any side of a triangle is always shorter
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