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;
typedef long long ll;
using namespace std;
#define F first
#define S second
#define sz size()
#define all(x) (x).begin(), (x).end()
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
if(N<=2) return N*N-1;
ll 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;
ll all = N*N-1;
all-=min(x,N-x-1);
all-=min(y,N-y-1);
return all;
}
# | 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... |