← All problemsSign in

Sereja and Transformation

CodeChefRating 1914Open on judge ↗

Problem Statement - Sereja has a sequence of n integers a[1], a[2], ..., a[n]. Sereja can do following transformation of the array: create a new sequence of n integers b[1], b[2], ..., b[n]in this way: (1 ≤ i ≤ n) Replace the sequence a by b, i.e., a[i] = b[i] for all i in [1, n] Sereja decided to use his transformation k times. Then he computed the value of , where r — the sequence obtained

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