#include <stdio.h> int main() { int n = 0, m = 0, k = 0; int i = 0, j = 0; int arr[1000][1000] = {0}; //空间太大,暂时不知道怎么优化 scanf("%d %d %d",...