#include using namespace std; const int MAXRINGS = 100; const int MAXSECTORS = 100; bool table[MAXRINGS][MAXSECTORS]; bool tmp[MAXRINGS][MAXSECTORS]; int getRowCount(int r, int s, int ns) { int count = table[r][s]; if (s>0) count += table[r][s-1]; else count += table[r][ns-1]; if (s> m >> n; while (m > 0) { icase++; for(int i=0; i> k; for(int i=0; i> r >> s; table[r][s] = true; } cin >> g; for(int ig=1; ig<=g; ig++) { for(int i=0; i> m >> n; } }