#include #include #include #define MAX_SIZE 100 int main() { int n, x, y, histx[MAX_SIZE], histy[MAX_SIZE], pop, totpop, cumpop, xloc, yloc, dist; scanf("%d", &n); while (n--) { scanf("%d %d", &x, &y); memset(histx, 0, x*sizeof(int)); memset(histy, 0, y*sizeof(int)); totpop = 0; for (int i=0; i