Strange operations
CodeChefOpen on judge ↗
Given an array $A$ with $n$ elements $a_1, a_2, a_3...a_n$. another array $B$ containing $n$ elements $b_1, b_2, b_3....b_n$ is constructed; Each $b_i$ is calculated by a sequence of operations as follows $:$ 1. Start with the array $C$, where $C$ is the suffix array of $A$, $C = [a_i...a_n]$. 2. If size of the array $C$ is $1$, set $b_i$ = $c_1$ and stop. Else perform operation $3$. 3. Let
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