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>
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++)
{
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;
}
# | 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... |