Source Code
#include "bits/stdc++.h"
using namespace std;
int main() {
    cin.tie(0)->sync_with_stdio(0);
    int t;
    cin >> t;
    while(t--){
        int n;
        string a, b;
        cin >> n >> a >> b;
        if(a == b)
            cout << 0;
        else
            cout << 1;
        cout << '\n';
    }
}
Copy
Split and Swap mhmdeid12
GNU G++17
4 ms
1.0 MB
Accepted