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>
typedef long long ll;
const long long inf = 2e9;
using namespace std;
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
ll ans =0;
bool bad=0;
vector<pair<ll,ll>> corners={{0,0}, {0,N-1}, {N-1,0}, {N-1,N-1}};
for(int i=0; i<N; i++){
for(int j=0; j<N; j++){
if(F[i][j] and find(corners.begin(),corners.end(),make_pair((ll)i,(ll)j))==corners.end()){
bad=1;
}
ans+=!F[i][j];
}
}
if(N==2 and ans==2 and ((F[0][1]==1 and F[1][0]==1) or (F[0][0]==1 and F[1][1]==1)))bad=1;
if(bad)return -1;
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... |