SAISHA AND HER STRING OPERATION
CodeChefOpen on judge ↗
$Saisha$ has a string $S$. $Definitions$ of $functions$: $reverse(1010)$ $=$ $0101$ (reverses the string), $flip(101011)$ $=$ $010100$ (flips every character of string) $S$ $=$ "$1$" She has the following $operation$: - $S$ $=$ $S$ $+$ '$1$' $+$ $flip(reverse(S))$ She does this $1000$ times. You need to print the $Xth$ character of $S$ after $1000$ operations.
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