#include using namespace std; bool check(vector>&a,int i,int j,int n){ bool ans=true; for(int k=0;k> n; vector>a(n,vector(n,-1)); for(int i=0;i