3079: Idol

时间限制:500 ms 内存限制:128 MB
上传者:
提交:0 通过:0

题目描述

As an idol of CHD, Teacher Gao loves singing, dancing, rap and playing basketball. Due to high popularity, his fans are also called iyang. With excellent talent, Teacher Gao appreciates smart peoples as well. This time, Teacher Gao comes up with a question. The one who solves the question can get his autograph as a reward.

Give two strings $s$ and $t$. Both of them are composed of lowercased English letters, and concurrently, have the same length. Every time you can execute one of the following operations towards string $s$ :
  1. Exchange two adjacent letters arbitrarily.
  2. Alter one letter to another lowercased English letter arbitrarily.

Eventually, only the iyang, who uses the minimum operations to change $s$ to $t$, can get Teacher Gao's autograph.

As a member of iyang, Senior Wang is crazy about this prize. Please tell him the minimum number of operations.


输入格式

The first line contains an integer number T, the number of test cases.

For each test case :

The first line contains a string $s$($1 \leq |s| \leq 10^{5}$).

The second line contains a string $t$($|t| = |s|$).

输出格式

For each test case print a number, the minimum number of operations required.

输入样例 复制

2
ababa
babab
abcde
bcaec

输出样例 复制

3
4