#include #include #include typedef struct { int x; int y; } Point; int main() { int N, M; scanf("%d %d", &N, &M); int** paper = (int**)malloc(sizeof(int*)*N); int cheese = 0; int time = 0; for(int i=0; i 1) { paper[i][j] = 0; cheese--; } } } time++; } printf("%d\n",time); for(int i=0; i