Pasha and Good Ones
Pasha has a string $A$, of length $N$, and an integer $K$. Consider a string $B$ of length $M$. A character $c$ in string $B$ is said to be *good*, if the difference between the total occurrences of $c$ and the total remaining characters in $B$ (other than $c$), is equal to $K$. Formally, if $\texttt{freq(c, B)}$ denotes the frequency of character $c$ in string $B$ of length $M$, then, the fol
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