# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
840678 | 2023-08-31T15:38:40 Z | hcng | 축구 경기장 (IOI23_soccer) | C++17 | 258 ms | 31776 KB |
#include <bits/stdc++.h> #include "soccer.h" using namespace std; int biggest_stadium(int n, vector<vector<int>> f) { int cnt = 0; vector<pair<int, int>> v; bool flag = false; for (int i = 0; i < n; i++) { int l = -1, r = -1; for (int j = 0; j < n; j++) { if (f[i][j] == 0) cnt++; if (f[i][j] == 0 && l == -1) { l = j; } if (f[i][j] == 0 && r != -1) { return -1; } if (f[i][j] == 1 && l != -1) { r = j - 1; } } if (l != -1 && r == -1) r = n - 1; if (!v.empty() && l == -1) { if (flag) { return -1; } else { flag = true; } } if (l != -1) v.emplace_back(l, r); } flag = false; for (int i = 1; i < v.size(); i++) { if ((v[i].first > v[i - 1].first && v[i].second > v[i - 1].second) || (v[i].first < v[i - 1].first && v[i].second < v[i - 1].second)) { return -1; } if (!flag) { if (!(v[i].first <= v[i - 1].first && v[i].second >= v[i - 1].first)) { flag = true; } } else { if (!(v[i].first >= v[i - 1].first && v[i].second <= v[i - 1].first)) { return -1; } } } return cnt; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 212 KB | partial |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | ok |
2 | Correct | 0 ms | 212 KB | ok |
3 | Correct | 0 ms | 212 KB | ok |
4 | Correct | 0 ms | 212 KB | ok |
5 | Correct | 0 ms | 212 KB | ok |
6 | Partially correct | 0 ms | 212 KB | partial |
7 | Partially correct | 1 ms | 340 KB | partial |
8 | Partially correct | 15 ms | 2188 KB | partial |
9 | Partially correct | 258 ms | 31776 KB | partial |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | ok |
2 | Correct | 0 ms | 212 KB | ok |
3 | Partially correct | 0 ms | 212 KB | partial |
4 | Incorrect | 0 ms | 212 KB | wrong |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 212 KB | partial |
2 | Correct | 0 ms | 212 KB | ok |
3 | Correct | 0 ms | 212 KB | ok |
4 | Partially correct | 0 ms | 212 KB | partial |
5 | Incorrect | 0 ms | 212 KB | wrong |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 212 KB | partial |
2 | Correct | 0 ms | 212 KB | ok |
3 | Correct | 0 ms | 212 KB | ok |
4 | Correct | 0 ms | 212 KB | ok |
5 | Correct | 0 ms | 212 KB | ok |
6 | Partially correct | 0 ms | 212 KB | partial |
7 | Incorrect | 0 ms | 212 KB | wrong |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 212 KB | partial |
2 | Correct | 0 ms | 212 KB | ok |
3 | Correct | 0 ms | 212 KB | ok |
4 | Correct | 0 ms | 212 KB | ok |
5 | Correct | 0 ms | 212 KB | ok |
6 | Partially correct | 0 ms | 212 KB | partial |
7 | Incorrect | 0 ms | 212 KB | wrong |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 1 ms | 212 KB | partial |
2 | Correct | 0 ms | 212 KB | ok |
3 | Correct | 0 ms | 212 KB | ok |
4 | Correct | 0 ms | 212 KB | ok |
5 | Correct | 0 ms | 212 KB | ok |
6 | Correct | 0 ms | 212 KB | ok |
7 | Partially correct | 0 ms | 212 KB | partial |
8 | Partially correct | 1 ms | 340 KB | partial |
9 | Partially correct | 15 ms | 2188 KB | partial |
10 | Partially correct | 258 ms | 31776 KB | partial |
11 | Partially correct | 0 ms | 212 KB | partial |
12 | Incorrect | 0 ms | 212 KB | wrong |
13 | Halted | 0 ms | 0 KB | - |