# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1084530 | thangdz2k7 | Soccer Stadium (IOI23_soccer) | C++17 | 200 ms | 39508 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// author : thembululquaUwU
// 3.9.2024
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define endl '\n'
using namespace std;
using ll = long long;
using ii = pair <int, int>;
using vi = vector <int>;
const int MaxN = 2e5;
const int mod = 1e9 + 7;
void maxl(auto &a, auto b) {a = max(a, b);}
void minl(auto &a, auto b) {a = min(a, b);}
int biggest_stadium(int n, vector <vi> f){
// if (n > 30){
int ans = 0;
vi l(n, -1), r(n, -1);
int st = -1, ed = n;
for (int i = 0; i < n; ++ i){
int nt = 0;
for (int j = 0; j < n; ++ j) {
if (!f[i][j]){
if (l[i] == -1) l[i] = j;
r[i] = j; ++ ans;
if (st == -1) st = i; if (i > ed) return 0;
if (nt) return 0;
}
else if (l[i] != -1) nt = 1;
}
if (l[i] == -1) ed = i;
}
int h = 0;
for (int i = st + 1; i < ed; ++ i){
int j = i - 1;
if (l[i] <= l[j] && r[j] <= r[i] && h == 0) continue;
h = 1;
if (l[j] <= l[i] && r[i] <= r[j] && h == 1) continue;
return 0;
}
// for (int i = 0; i < n; ++ i) l[i] = -1, r[i] = -1;
// st = -1, ed = n;
// for (int j = 0; j < n; ++ j){
// int nt = 0;
// for (int i = 0; i < n; ++ i) {
// if (!f[i][j]){
// if (l[j] == -1) l[j] = i;
// r[j] = i;
// if (st == -1) st = j; if (j > ed) return 0;
// if (nt) return 0;
// }
// else if (l[j] != -1) nt = 1;
// }
// if (l[j] == -1) ed = 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... |