| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 427606 | Ahmadsm2005 | Rectangles (IOI19_rect) | C++14 | 5055 ms | 39996 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rect.h"
//#include "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
vector<vector<pair<int,int>>>RE(701);
int n,m;
vector<vector<int>>A;
bool check(int x1,int x2,int y1,int y2){
for(int i=x1;i<=x2;i++){
for(int l=y1;l<=y2;l++){
if((A[x1-1][l]<=A[i][l])||(A[x2+1][l]<=A[i][l])||(A[i][y1-1]<=A[i][l])||(A[i][y2+1]<=A[i][l]))
return 0;
}
}
return 1;
}
long long count_rectangles(vector<vector<int>>a){
A=a;
n=a.size(),m=a[0].size();
for(int i=1;i<n-1;i++){
for(int l=1;l<m-1;l++){
for(int x=l;x<m-1;x++){
if(check(i,i,l,x)){
RE[i].push_back({l,x});
}
}
}
}
long long CNT=0;
set<pair<pair<int,int>,pair<int,int>>>lol;
for(int i=1;i<n-1;i++){
for(int l=1;l<n-1;l++){
for(int x=0;x<RE[i].size();x++){
if(lol.find({{i,l},{RE[i][x].first,RE[i][x].second}})==lol.end())
lol.insert({{i,l},{RE[i][x].first,RE[i][x].second}});
else
continue;
if(check(min(i,l),max(l,i),RE[i][x].first,RE[i][x].second)){
CNT++;
}
}
}
}
return CNT;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
