Share It!
CodeChefOpen on judge ↗
*We're using the same protagonist from last contest because we're lazy.* Shriram has four chocolates, which he wants to give to two of his friends, V\* and G\*. The four chocolates have a taste of $a_1$, $a_2$, $a_3$ and $a_4$ respectively. Shriram being a very kind person wants to give the chocolates to them in such a way that both of them receive as much equal taste as possible. Shriram no
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