Source Code
#include <iostream>

using namespace std;

int main()
{
    int n,test;
    string s,t;
    cin >> test;
    while (test--) {
        cin >> n >>  s >> t;
        if ( s == t ) cout << 0 << endl;
        else cout << 1 << endl;
    }
}
Copy
Split and Swap MOohamed_Mahfouz
GNU G++17
46 ms
844 KB
Accepted