답안 #534320

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
534320 2022-03-08T04:33:40 Z Monarchuwu Monster Game (JOI21_monster) C++17
10 / 100
219 ms 284 KB
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
 
#include "monster.h"
const int N = 1000 + 3;
int cnt[N];
vector<int> Solve(int n) {
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < i; ++j)
            ++cnt[Query(i, j) ? i : j];
 
    vector<int> ans(n, 0), vec1, vecn;
    for (int i = 0; i < n; ++i) {
        if (cnt[i] == n - 2) vecn.push_back(i);
        else if (cnt[i] == 1) vec1.push_back(i);
        else ans[i] = cnt[i];
    }
 
    if (Query(vec1[0], vec1[1]))
        ans[vec1[0]] = 0, ans[vec1[1]] = 1;
    else ans[vec1[0]] = 1, ans[vec1[1]] = 0;
 
    if (Query(vecn[0], vecn[1]))
        ans[vecn[0]] = n - 2, ans[vecn[1]] = n - 1;
    else ans[vecn[0]] = n - 1, ans[vecn[1]] = n - 2;
 
    return ans;
}
/**  /\_/\
 *  (= ._.)
 *  / >0  \>1
**/
# 결과 실행 시간 메모리 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 0 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 200 KB Output is correct
16 Correct 206 ms 200 KB Output is correct
17 Correct 84 ms 200 KB Output is correct
18 Correct 162 ms 200 KB Output is correct
19 Correct 204 ms 200 KB Output is correct
20 Correct 154 ms 200 KB Output is correct
21 Correct 0 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 1 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 111 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 1 ms 220 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 143 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 0 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 200 KB Output is correct
16 Correct 206 ms 200 KB Output is correct
17 Correct 84 ms 200 KB Output is correct
18 Correct 162 ms 200 KB Output is correct
19 Correct 204 ms 200 KB Output is correct
20 Correct 154 ms 200 KB Output is correct
21 Correct 0 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 1 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 111 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 1 ms 220 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 143 ms 200 KB Output is correct
33 Incorrect 219 ms 276 KB Wrong Answer [6]
34 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 179 ms 284 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -