Editorial for DMOPC '19 Contest 4 P0 - Yikes
Submitting an official solution before solving the problem yourself is a bannable offence.
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.