Replacing Game
You are given two strings $A$ and $B$, both of length $N$ and containing only lowercase English letters. You also have an integer $K$. You can perform the following operation: - Choose a continuous substring of $A$ of size exactly $K$, and a character $c$. Then, replace all characters in the substring with $c$. - Formally, you choose an index $i$ ($1 \leq i \leq N-K+1$) and a character $c
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