Here is the problem: 762C - Two strings.
When $$$a$$$ is abcdcba
and $$$b$$$ is abdcdba
, the answer may be abcdba
or abdcba
.
Why doesn't the problem have "if there are multiple solutions, print any"?
I also wonder whether the data contains this kind of input.