Given two strings and with the same length and composed of uppercase English letters, ensure that each letter in and appears the same number of times.You can exchange two adjacent characters in string each time, find out how many times you need to exchange so that string becomes string .
输入
The first line is a positive integer , which represents the length of the string.The second and third lines each have a string of length , which represent sting and string and contain only uppercase letters.
输出
A nonnegative integer that represents the minimum number of exchanges.
样例
标准输入 复制文本 |
4 CABC CCAB |
标准输出 复制文本 |
2 |
来源
SCNUCPC 2020 现场赛