1 solutions

  • 0
    @ 2025-11-27 11:58:27

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    char ch[110][110];
    int main()
    {
    	int n,m,x1,x2,y1,y2;
    	cin>>n>>m;
    	cin>>x1>>x2>>y1>>y2;
    	for(int i=1;i<=n;i++)
    	{
    		scanf("%s",ch[i]+1);
    	}
    	for(int i=x1;i<=x2;i++)
    	{
    		for(int j=y1;j<=y2;j++)
    		{
    			cout<<ch[i][j];
    		}
    		cout<<"\n";
    	} 
    	return 0;
    }
    
    • 1

    Information

    ID
    69
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By