Submission #1031035

#TimeUsernameProblemLanguageResultExecution timeMemory
1031035Marco_EscandonRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; long long count_rectangles(std::vector<std::vector<int> > a) { ll cont=0; ll n=a.size();ll m=a[0].size(); for(int i=0; i<n-1; i++) { for(int j=0; j<m-1; j++) { ll c1=cont; for(int k=i+2; k<n; k++) { for(int l=j+2; l<m; l++) { ll pl=1; for(int o=i+1; o<k; o++) { for(int p=j+1; p<l; p++) { if(a[o][p]>=min(min(a[i][p],a[k][p]),min(a[o][j],a[o][l]))) { pl=0; goto fin1; } } } fin1:; cont+=pl; } } } } return cont; } int main() { int n, m; cin>>n; cin>>m; vector<vector<int>> a(n, vector<int>(m)); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin>>a[i][j]; } } long long result = count_rectangles(a); cout<<result; return 0; }

Compilation message (stderr)

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:12:16: warning: unused variable 'c1' [-Wunused-variable]
   12 |             ll c1=cont;
      |                ^~
/usr/bin/ld: /tmp/ccSGmVuj.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cclmID5i.o:rect.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status