답안 #839891

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839891 2023-08-30T20:06:28 Z abdzag 축구 경기장 (IOI23_soccer) C++17
1.5 / 100
240 ms 31632 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB ok
2 Correct 0 ms 212 KB ok
3 Correct 0 ms 212 KB ok
4 Correct 1 ms 212 KB ok
5 Correct 0 ms 212 KB ok
6 Partially correct 1 ms 212 KB partial
7 Partially correct 1 ms 340 KB partial
8 Partially correct 15 ms 2192 KB partial
9 Partially correct 240 ms 31632 KB partial
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB ok
2 Correct 0 ms 212 KB ok
3 Partially correct 0 ms 212 KB partial
4 Partially correct 0 ms 212 KB partial
5 Partially correct 0 ms 212 KB partial
6 Partially correct 0 ms 212 KB partial
7 Incorrect 0 ms 212 KB wrong
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 0 ms 212 KB ok
3 Correct 0 ms 212 KB ok
4 Partially correct 0 ms 212 KB partial
5 Partially correct 0 ms 212 KB partial
6 Partially correct 0 ms 212 KB partial
7 Partially correct 0 ms 212 KB partial
8 Incorrect 0 ms 212 KB wrong
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 0 ms 212 KB ok
3 Correct 0 ms 212 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 1 ms 212 KB ok
6 Partially correct 0 ms 212 KB partial
7 Partially correct 0 ms 212 KB partial
8 Partially correct 0 ms 212 KB partial
9 Partially correct 0 ms 212 KB partial
10 Incorrect 0 ms 212 KB wrong
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 0 ms 212 KB ok
3 Correct 0 ms 212 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 1 ms 212 KB ok
6 Partially correct 0 ms 212 KB partial
7 Partially correct 0 ms 212 KB partial
8 Partially correct 0 ms 212 KB partial
9 Partially correct 0 ms 212 KB partial
10 Incorrect 0 ms 212 KB wrong
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 0 ms 212 KB ok
3 Correct 0 ms 212 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 1 ms 212 KB ok
6 Correct 0 ms 212 KB ok
7 Partially correct 1 ms 212 KB partial
8 Partially correct 1 ms 340 KB partial
9 Partially correct 15 ms 2192 KB partial
10 Partially correct 240 ms 31632 KB partial
11 Partially correct 0 ms 212 KB partial
12 Partially correct 0 ms 212 KB partial
13 Partially correct 0 ms 212 KB partial
14 Partially correct 0 ms 212 KB partial
15 Incorrect 0 ms 212 KB wrong
16 Halted 0 ms 0 KB -