#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
int x = -1, y = -1;
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
if (F[i][j]) {
x = i;
y = j;
break;
}
}
if (x != -1) break;
}
if (x == -1) return N * N;
return max(max(x * N + y * N - x * y, x * N + (N - y - 1) * N - x * (N - y - 1)), max((N - x - 1) * N + y * N - (N - x - 1) * y, (N - x - 1) * N + (N - y - 1) * N - (N - x - 1) * (N - y - 1)));
}
# | 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... |