Submission #207554

#TimeUsernameProblemLanguageResultExecution timeMemory
207554phamhoanghiepRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n][m]; for(int i=0 ; i<n ; i++) { for(int j=0 ; j<m ; j++) { cin>>a[i][j]; } } int cnt=0; for(int r1=1 ; r1<n-1 ; r1++) { for(int r2=r1 ; r2<n-1 ; r2++) { for(int c1=1 ; c1<m-1 ; c1++) { for(int c2=c1 ; c2<n-1 ; c2++) { bool ok=true; for(int i=r1 ; i<=r2 ; i++) { for(int j=c1 ; j<=c2 ; j++) { if(a[i][j]>=a[i][c1-1]) ok=false; if(a[i][j]>=a[i][c2+1]) ok=false; if(a[i][j]>=a[r1-1][j]) ok=false; if(a[i][j]>=a[r2+1][j]) ok=false; } } if(ok==true) cnt++; } } } } cout<<cnt; }

Compilation message (stderr)

/tmp/ccbdpkew.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccRM4A5s.o:rect.cpp:(.text.startup+0x0): first defined here
/tmp/ccbdpkew.o: In function `main':
grader.cpp:(.text.startup+0x632): undefined reference to `count_rectangles(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status