| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 826920 | vjudge1 | Rectangles (IOI19_rect) | C++17 | 9 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "rect.h"
using namespace std;
#define all(x) x.begin(), x.end()
#define pb push_back
#define ll long long
#define vout(v) for(int i=0; i<v.size(); i++) cout<<v[i]<<' ';
int a[3000][3000];
long long count_rectangles(vector<vector<int> > S){
int n=S.size(), m=S[0].size();
for(int i=1; i<=n; i++){
for(int j=1; j<=m; j++){
a[i][j] = S[i-1][j-1];
}
}
if(n <= 2 or m <= 2){
return 0;
}
if(n <= 3){
ll ans=0;
for(int i=1; i<m-1; i++){
int mx=a[2][i+1];
int ok = (a[2][i+1] < a[1][i+1] and a[2][i+1] < a[3][i+1]);
for(int j=i+2; j<=m; j++){
if(min(a[2][i], a[2][j]) > mx and ok){
ans++;
}
mx = max(mx, a[2][j]);
ok = (ok and (a[2][j] < a[1][j] and a[2][j] < a[3][j]));
}
}
return ans;
}
}
컴파일 시 표준 에러 (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... | ||||
