#include using namespace std; int main(){ int N;cin>>N; int Q[1<>Q[i][j]; }cin>>R[i]; }for(int k=1;k<(1<