#include<bits/stdc++
2026-09-30 17:40:17
发布于:广东
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int a[1005][1005];
int main() {
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
int e;
cin >> e;
int x1, y1, x2, y2;
for(int k = 0; k < e; k++) {
cin >> x1 >> y1 >> x2 >> y2;
for(int i = x1; i <= x2; i++) {
for(int j = y1; j <= y2; j++) {
cout << a[i][j] << " ";
}
cout << endl;
}
}
return 0;
}
这里空空如也








有帮助,赞一个