Editorial for DMOPC '19 Contest 4 P0 - Yikes
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
For this problem, it suffices to loop through all the indices and count the number of non-matching pairs between the two strings. Formally, count all indices such that .
If this count is exactly one, it is possible, and otherwise, it is not.
Comments