# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964434 | nguyentunglam | Soccer Stadium (IOI23_soccer) | C++17 | 2102 ms | 418012 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "soccer.h"
#include<bits/stdc++.h>
#define all(v) v.begin(), v.end()
using namespace std;
const int N = 2010;
int n;
bool a[N][N];
vector<int> arr[N];
int check_valid() {
for(int col = 0; col < n; col++) {
for(int row = 0; row < n; row++) if (a[row][col] == 0) arr[col].push_back(row);
}
int st = 0;
while (st < n && arr[st].empty()) st++;
if (st == n) return 0;
int ed = st;
while (ed < n && !arr[ed].empty()) ed++; ed--;
for(int i = 1; i < st; i++) if (!arr[i].empty()) return 0;
for(int i = ed + 1; i < n; i++) if (!arr[i].empty()) return 0;
for(int i = st; i <= ed; i++) if (arr[i].size() != arr[i].back() - arr[i][0] + 1) return 0;
int cnt = 0;
Compilation message (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... |