1 solutions

  • 0
    @ 2026-9-2 20:22:53
    #include<bits/stdc++.h>
    using namespace std;
    char a[110][110];
    int main()
    {
    	int h,w;
    	cin>>h>>w;
    	int x1,x2,y1,y2;
    	cin>>x1>>x2>>y1>>y2;
    	for(int i=1;i<=h;i++)
    	{
    		for(int j=1;j<=w;j++)
    		{
    			cin>>a[i][j];
    		}
    	}
    	for(int i=x1;i<=x2;i++)
    	{
    		for(int j=y1;j<=y2;j++)
    		{
    			cout<<a[i][j];
    		}
    		cout<<endl;
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    2809
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    10
    Tags
    # Submissions
    7
    Accepted
    4
    Uploaded By