We Are Friends 2
CodeChefOpen on judge ↗
Teacher of Pizza school of Margarita District is in serious problem, that his class students have developed groupism such that there are $N$ groups and every $i-th$ group contains $A[i]$ students. Teacher found that in the group there is a strong friendship but among the groups it's enmity. Now teacher decided to unite the whole class in the friendship. So he decided to select triplet of students
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