Source Code
#include <bits/stdc++.h>

using namespace std;

int main()
{
	int T, n, ans = 0;
	cin >> T;
	while (T--) {
		string s, t;
		ans = 0;
		cin >> n >> s >> t;
		if (s == t) {
			cout << 0 << endl;
			continue;
		}
		cout << 1 << endl;
	}

	return 0;
}
Copy
Split and Swap Malek_Alian
GNU G++17
83 ms
1.1 MB
Accepted