답안 #423517

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
423517 2021-06-11T08:28:25 Z 송준혁(#7517) Monster Game (JOI21_monster) C++17
10 / 100
289 ms 280 KB
#include "monster.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define lb lower_bound
#define MOD 1000000007
#define INF (1ll<<62)
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;

namespace {
    int D[1010];
}

std::vector<int> Solve(int N) {
    vector<int> ans(N);
    for (int i = 0; i < N; i++) for (int j=i+1; j<N; j++){
        if (Query(i, j)) D[i]++;
        else D[j]++;
    }
    int a=0, b=0, c=0, d=0;
    for (int i=0; i<N; i++){
        if (D[i] == 1){
            if (a) b = i;
            else a = i;
        }
        else if (D[i] == N-2){
            if (c) d = i;
            else c = i;
        }
        else ans[i] = D[i];
    }
    if (Query(a, b)) ans[a]=0, ans[b]=1;
    else ans[b]=0, ans[a]=1;
    if (Query(c, d)) ans[c]=N-2, ans[d]=N-1;
    else ans[d]=N-2, ans[c]=N-1;
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 200 KB Output is correct
2 Correct 0 ms 200 KB Output is correct
3 Correct 1 ms 200 KB Output is correct
4 Correct 1 ms 200 KB Output is correct
5 Correct 1 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 1 ms 200 KB Output is correct
8 Correct 1 ms 200 KB Output is correct
9 Correct 1 ms 200 KB Output is correct
10 Correct 1 ms 200 KB Output is correct
11 Correct 1 ms 200 KB Output is correct
12 Correct 1 ms 200 KB Output is correct
13 Correct 1 ms 200 KB Output is correct
14 Correct 1 ms 200 KB Output is correct
15 Correct 1 ms 244 KB Output is correct
16 Correct 131 ms 200 KB Output is correct
17 Correct 111 ms 200 KB Output is correct
18 Correct 159 ms 200 KB Output is correct
19 Correct 159 ms 200 KB Output is correct
20 Correct 180 ms 200 KB Output is correct
21 Correct 1 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 3 ms 200 KB Output is correct
24 Correct 1 ms 200 KB Output is correct
25 Correct 1 ms 200 KB Output is correct
26 Correct 147 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 1 ms 200 KB Output is correct
29 Correct 1 ms 200 KB Output is correct
30 Correct 1 ms 200 KB Output is correct
31 Correct 1 ms 200 KB Output is correct
32 Correct 211 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 200 KB Output is correct
2 Correct 0 ms 200 KB Output is correct
3 Correct 1 ms 200 KB Output is correct
4 Correct 1 ms 200 KB Output is correct
5 Correct 1 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 1 ms 200 KB Output is correct
8 Correct 1 ms 200 KB Output is correct
9 Correct 1 ms 200 KB Output is correct
10 Correct 1 ms 200 KB Output is correct
11 Correct 1 ms 200 KB Output is correct
12 Correct 1 ms 200 KB Output is correct
13 Correct 1 ms 200 KB Output is correct
14 Correct 1 ms 200 KB Output is correct
15 Correct 1 ms 244 KB Output is correct
16 Correct 131 ms 200 KB Output is correct
17 Correct 111 ms 200 KB Output is correct
18 Correct 159 ms 200 KB Output is correct
19 Correct 159 ms 200 KB Output is correct
20 Correct 180 ms 200 KB Output is correct
21 Correct 1 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 3 ms 200 KB Output is correct
24 Correct 1 ms 200 KB Output is correct
25 Correct 1 ms 200 KB Output is correct
26 Correct 147 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 1 ms 200 KB Output is correct
29 Correct 1 ms 200 KB Output is correct
30 Correct 1 ms 200 KB Output is correct
31 Correct 1 ms 200 KB Output is correct
32 Correct 211 ms 200 KB Output is correct
33 Incorrect 156 ms 280 KB Wrong Answer [6]
34 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 289 ms 280 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -