For the Watch
CodeChefOpen on judge ↗
In the north, the Night King has started preparing for the great war. He has an army of n wights. These wights have different strength values which is denoted by an array $A$ i.e. $A[i]$ denotes the strength of the $i$th wight where 0$\le$i$\lt$n . The total strength of the wights is the successive powers of their strengths i.e. if the wights have strength $p$,$q$,$r$,$s$,$t$ then their total stre
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