# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1030897 | fv3 | Rectangles (IOI19_rect) | C++14 | 4 ms | 484 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 "rect.h"
#include <bits/stdc++.h>
using namespace std;
using namespace std;
typedef long long ll;
ll count_rectangles(vector<vector<int>> a)
{
const int N = a.size();
const int M = a[0].size();
ll res = 0;
for (int i = 1; i < M - 1; i++)
{
int mx = 0;
for (int j = i; j < M - 1; j++)
{
if (a[1][j] >= a[0][j] || a[1][j] >= a[2][j])
break;
mx = max(mx, a[1][j]);
if (mx < a[1][i-1] && mx < a[1][j+1])
res++;
}
}
return res;
}
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... |