Editorial for DMOPC '21 Contest 9 P2 - String Puzzle
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Subtask 1
Iterate through both strings simultaneously. Any excess a
s in a
immediately behind to match the b
correctly in a
or there is an extraneous b
in
Time Complexity:
Subtask 2
Similar to the first subtask, if a character in
Time Complexity:
Alternately, note that if we let
Time Complexity:
Comments