Convert Strings by Flips
*This problem is similar to the problem `"STRFLIP2"`. The only difference between them is the number of moves allowed — in this problem, up to $N$ moves can be made. In Div. 1 and Div. 2 this problem is worth $40$ points and `"STRFLIP2"` is worth $60$. In Div. 3 this problem is worth $100$ points and `"STRFLIP2"` is non-scorable.* You are given a binary string $A$ of length $N$, which we treat as
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