This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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=0; i+2<n; i++){
for(int l=0; l<m; l++)
for(int r=l+2; r<m; r++)
{
bool bad = false;
for(int k=i+1; k+1<n; k++)
{
for(int j=l+1; j+1<=r; j++){
if(a[k][j] >= a[i][j] || a[k][j] >= a[k+1][j]){
bad = true;
break;
}
}
if(bad) break;
ans++;
}
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |