Source Code
#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
#define ll long long
const int  N =26;
int occ[N];
int main() {
    IOS

    int t;cin>>t;
    while(t--){;
        int n;cin>>n;
        string a,b;cin>>a>>b;
        cout<<(a!=b?"1\n":"0\n");
    }

};
Copy
Split and Swap HusseinSaad
GNU G++17
18 ms
816 KB
Accepted