Submission #432132

#TimeUsernameProblemLanguageResultExecution timeMemory
432132LouayFarahRectangles (IOI19_rect)C++14
37 / 100
5099 ms22872 KiB
#include "bits/stdc++.h" #include "rect.h" using namespace std; #define pb push_back #define ll long long int ll count_rectangles(vector<vector<int>> a) { int n = (int)a.size(); int m = (int)a[0].size(); ll res = 0; for(int i = 1; i<n-1; i++) { for(int j = 1; j<m-1; j++) { for(int x = i; x<n-1; x++) { for(int y = j; y<m-1; y++) { bool flag = true; for(int h = i; h<=x; h++) { for(int k = j; k<=y; k++) { if(a[h][k]>=a[h][j-1]) flag = false; if(a[h][k]>=a[h][y+1]) flag = false; if(a[h][k]>=a[i-1][k]) flag = false; if(a[h][k]>=a[x+1][k]) flag = false; if(!flag) break; } if(!flag) break; } if(flag) { /*point.pb(mp(i, j)); point.pb(mp(x, y));*/ res++; } } } } } return res; }
#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...