DIFSTR - Editorial

thank you so much!
:grinning_face_with_smiling_eyes:
i got it right with scanner class👍

#include<bits/stdc++.h>
using namespace std;

int main( ) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);

   int t,n,i,j;
  cin>>t;
    while(t--) {
        cin>>n;
       string a,b;
         
    for(i=0;i<n;i++) {
        
     for(j=0;j<n;j++)   {
       cin>>b[j]; }
       
        if(b[i]=='0') { 
          a[i]='1';}
          
        else {a[i]='0'; }
   
    cout<<a[i];}

     cout<<endl;  }
      
       return 0; } 

// Why I am getting a SIGABRT (here) ?