Submission #332369

#TimeUsernameProblemLanguageResultExecution timeMemory
332369nicholaskRectangles (IOI19_rect)C++14
37 / 100
5061 ms28396 KiB
//#include "rect.h" #include <bits/stdc++.h> using namespace std; long long count_rectangles(vector <vector <int> > a){ int n=a.size(),m=a[0].size(); long long ans=0; for (int r1=1; r1<=n-2; r1++){ for (int r2=r1; r2<=n-2; r2++){ for (int c1=1; c1<=m-2; c1++){ for (int c2=c1; c2<=m-2; c2++){ for (int i=r1; i<=r2; i++){ for (int j=c1; j<=c2; j++){ if (a[i][j]>=a[i][c1-1]||a[i][j]>=a[i][c2+1]||a[i][j]>=a[r1-1][j]||a[i][j]>=a[r2+1][j]) goto die; } } ans++; die:; } } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...