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