Submission #891777

#TimeUsernameProblemLanguageResultExecution timeMemory
891777Trisanu_DasRectangles (IOI19_rect)C++17
25 / 100
5087 ms22676 KiB
#include <bits/stdc++.h> #include "rect.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 i = 1; i < N - 1; i++){ for(int j = i; j < N - 1; j++){ for(int k = 1; k < M - 1; k++){ for(int l = k; l < M - 1; l++){ bool flag = true; for(int x = i; x <= j; x++) { for(int y = k; y <= l; y++) { if(A[x][y] >= min({A[i - 1][y], A[j + 1][y], A[x][k - 1], A[x][l + 1]})){ flag = false; break; } } } if(flag) ans++; } } } } 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...