# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
419026 | JediMaster11 | Rectangles (IOI19_rect) | C++17 | 12 ms | 356 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;
#define ll long long
#define vint vector<int>
#define vll vector<long long>
#define fo(a, b, c) for (int a = b; a < (int)c; a++)
#define rfo(a, b, c) for (int a = b - 1; a >= (int)c; a--)
#define print(x) cout << x << "\n"
ll count_rectangles(vector<vint> grid)
{
int n = grid.size();
int m = grid[0].size();
if(n <=2 || m <= 2){
return 0;
}
ll count=0;
bool work=true;
int maxEdge = max(grid[1][0], grid[1][m-1]);
//subtask 5
fo(i,1,m-1){
fo(j,i,m-1){
work=true;
fo(x,i,j+1){
int val = grid[1][x];
if(val >= grid[1][i-1] || val >= grid[0][x] || val >= grid[2][x] || val >= grid[1][j+1])
{
work=false;
break;
}
}
if(work){
count++;
}
}
}
return count;
}
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... |