# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
832826 | Marco_Escandon | Rectangles (IOI19_rect) | C++17 | 6 ms | 340 KiB |
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 n=a[0].size();
ll cont=0;
if(n<3||a.size()<3)
return 0;
for(int i=1; i<n-1; i++)
{
ll ma=0;
for(int j=i; j<n-1; j++)
{
ma=max(ma,(ll)a[1][j]);
if(a[1][j]>=a[0][j]||a[1][j]>=a[2][j])
break;
if(ma<a[1][i-1]&&ma<a[1][j+1])
cont++;
}
}
return cont;
}
Compilation message (stderr)
# | 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... |