GESP4级

· · 生活·游记

题目:

#include <bits/stdc++.h>
using namespace std;
string mapp[110]; 
int main(){
    int h,w;
    cin>>h>>w;
    int x1,x2,y1,y2;
    cin>>x1>>x2>>y1>>y2;
    for(int i=0;i<h;i++){
        cin>>mapp[i];
    }
    int cut_point=x2-x1;
    for(int i=x1-1;i<x1+cut_point;i++){
        cout<<mapp[i].substr(y1-1,y2-y1+1)<<endl;
    }
    return 0;
}