← All problemsSign in

The Smallest String

CodeChefRating 3435Open on judge ↗

Abdelmohaymn gives you a string $S$ of length $N$ that contains only **uppercase** and **lowercase** English letters. He also gives you two integers $x$ and $y$, meaning that the letters `'a'` to `'z'` have values $[x, x+1, x+2, \ldots, x+25]$ (in order), and the letters `'A'` to `'Z'` have values $[y, y+1, \ldots, y+25]$ (in order). For example, the value of `'e'` is $x+4$, and the value of `

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