Binary Calculation
CodeChefOpen on judge ↗
In last lecture Chef was teaching about binary number representation. Today he came up with an interesting task to check the understanding of student about binary number. So this task is, Students are given a collection of $N$ positive integers $A$0, $A$1, $A$2 …, $A$N-1, and then they have to compute the sum of square $∑(Ai)^2$ as maximum as possible for all $Ai$ where( 0 $\leq$ i $\leq$ N-1 )
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