← All problemsSign in

Chef and Triangles

Chef has come to a 2-dimensional garden in which there are **N** points. Each point has coordinates **(x, y)**, where **x** can either be **1**, **2**, or **3**. Chef will now choose every triplet of these **N** points and make a triangle from it. You need to tell the sum of areas of all the triangles the Chef makes. Note that some of the triplets might not form proper triangles and would end up

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start