Array Importance
CodeChefOpen on judge ↗
Trijeet and Prince are good friends and share all their secret. This time, Trijeet decided to share his secret of calculating the IMPORTANCE of an array. Here is the secret: Importance($I$) of the array($A$) is calculated as following: $I = \Sigma^{N}_{i=1} i^{A_i}$ He gave Prince an array of size $N$ [1-based indexing] and asked him to calculate the IMPORTANCE of the array. As the answer can b
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