| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1226787 | repsak | Rectangles (IOI19_rect) | C++20 | 5094 ms | 22852 KiB |
#include "rect.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long count_rectangles(vector<vector<int> > a) {
int height = a.size();
int width = a[0].size();
ll amount = 0;
for(int y = 1; y < height - 1; y++){
for(int x = 1; x < width - 1; x++){
for(int by = y; by < height - 1; by++)
{
for(int bx = x; bx < width - 1; bx++)
{
bool isPossible = true;
for(int i = y; i < by + 1; i++){
for(int j = x; j < bx + 1; j++){
int cell = a[i][j];
if(
cell >= a[i][x - 1] ||
cell >= a[i][bx + 1] ||
cell >= a[y - 1][j] ||
cell >= a[by + 1][j]
){
isPossible = false;
break;
}
}
if(!isPossible) break;
}
if(isPossible){
amount++;
}
}
}
}
}
return amount;
}
// #include "grader.cpp"
| # | 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... | ||||
