← All problemsSign in

3 Divisible Subsets

Problem Today Bhrigudov was getting bored in his class so he flipped to the last page of his textbook and founded a lot of random positive integral numbers printed on it. So, to get rid of boredom he thought, how many three element subsets can I make from these numbers such that sum of the elements of the subset is divisible by 3. As there can be too many such subsets, he turn to you for help.

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