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;
using ll = long long;
int biggest_stadium(int N, std::vector<std::vector<int>> F) {
int cnt = 0;
for(int i=0; i<N; i++)
for(int j=0; j<N; j++) cnt += (F[i][j] == 1);
if(!cnt) return N * N;
int x=0, y=0;
for(int i=0; i<N; i++)
for(int j=0; j<N; j++)
if(F[i][j] == 1) x = i, y = j;
return N * N - min({ (x + 1) * (y + 1), (N - x) * (y + 1), (x + 1) * (N - y), (N - x) * (N - 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... |