#include <stdio.h> #include <stdlib.h> int main() { int n, m; while (scanf("%d %d", &n, &m) != EOF) { // 注意 while 处理多个 case int* p = malloc(sizeof(int) * n * m); if (p == NULL) { perror("main"); return 1; ...