#F. JIXMPII5J0xa1MI#&@]
JIXMPII5J0xa1MI#&@]
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Statement
After struggling and failing many times, Ujan decided to try to clean up his house again. He decided to get his strings in order first.
Ujan has two distinct strings and of length consisting of only of lowercase English characters. He wants to make them equal. Since Ujan is lazy, he will perform the following operation exactly once: he takes two positions and ( , the values and can be equal or different), and swaps the characters and . Can he succeed?
Note that he has to perform this operation exactly once. He has to perform this operation.
Format
Input
The first line contains a single integer ( ), the number of test cases.
For each of the test cases, the first line contains a single integer ( ), the length of the strings and .
Each of the next two lines contains the strings and , each having length exactly . The strings consist only of lowercase English letters. It is guaranteed that strings are different.
Output
For each test case, output "Yes" if Ujan can make the two strings equal and "No" otherwise.
Sample
4
5
souse
houhe
3
cat
dog
2
aa
az
3
abc
bca
Yes
No
No
No
ShanghaiTech ACM 炸鱼杯
- 状态
- 已结束
- 规则
- OI
- 题目
- 46
- 开始于
- 2024-12-10 23:00
- 结束于
- 2024-12-15 13:00
- 持续时间
- 110 小时
- 主持人
- 参赛人数
- 112