3 solutions
-
0
#include<bits/stdc++.h> using namespace std; const int N=25; char s[N][N]; int main() { for(int i=1;i<=10;i++) { for(int j=1;j<=10;j++) { cin>>s[i][j]; } } char s1[15][15]; for(int q=1;q<=10;q++) for(int w=q;w<=10;w++) for(int x=1;x<=10;x++) for(int y=x;y<=10;y++) { memset(s1,'.',sizeof s1); for(int f=q;f<=w;f++) for(int g=x;g<=y;g++) { s1[f][g]='#'; } int b=0; for(int i=1;i<=10;i++) { for(int j=1;j<=10;j++) { if(s[i][j]==s1[i][j]) { b++; } } } if(b==100) { cout<<q<<" "<<w<<endl; cout<<x<<" "<<y<<endl; return 0; } } return 0; }
Information
- ID
- 2421
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 11
- Accepted
- 4
- Uploaded By