#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
int biggest_stadium(int n, vector<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;
}
}
}
int ans = 0;
if (x != -1) {
ans = max(ans, n * n - (x + 1) * (y + 1));
ans = max(ans, n * n - (x + 1) * (n - y));
ans = max(ans, n * n - (n - x) * (y + 1));
ans = max(ans, n * n - (n - x) * (n - y));
} else {
ans = n * n;
}
return ans;
}
# | 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... |