#include #define nmax 10000000 using namespace std; struct lee { int x, y; int nr; } coada[nmax]; const short nmax1=30; int raspuns[nmax1][nmax1]; bool matr[nmax1][nmax1]; int main() { int n; scanf("%d", &n); for(int i=1; i