# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1037957 | erray | Soccer Stadium (IOI23_soccer) | C++17 | 187 ms | 31828 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>
using namespace std;
#ifdef DEBUG
#include "/home/ioi/egoi2024/d2/debug.h"
#else
#define debug(...) void(37)
#endif
int biggest_stadium(int N, std::vector<std::vector<int>> F) {
int tree_count = 0, one_tree_i, one_tree_j;
for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) {
if (F[i][j]) {
tree_count++;
one_tree_i = i, one_tree_j = j;
}
}
if (tree_count <= 1) {
if (tree_count == 0) return N * N;
int i = one_tree_i;
int j = one_tree_j;
return N * N - min(i + 1, N - i) * min(j + 1, N - j);
}
}
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... |