G15|GESP.A62071题解
2026-08-09 17:23:51
发布于:广东
3阅读
0回复
0点赞
二维字符写法:
代码如下:
#include<bits/stdc++.h>
using namespace std;
char s[105][105];
int main(){
int h,w,x1,x2,y1,y2;
cin >> h >> w >> x1 >> x2 >> y1 >> y2;
for(int i = 1;i <= h;i++)
cin >> s[i];
for(int i = x1;i<=x2;i++){
for(int j = y1;j<=y2;j++)
cout << s[i][j-1];
cout << "\n";
}
return 0;
}
这里空空如也

有帮助,赞一个