Source Code
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int N=2e5+9;


int main()
{

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        string s,tt;
        cin>>s;
        cin>>tt;
        cout<<(s==tt?0:1)<<'\n';
    }
}
Copy
Split and Swap Ahmed_Allawati
GNU G++17
4 ms
1.0 MB
Accepted