이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |