답안 #102633

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
102633 2019-03-26T12:10:56 Z fanache99 Broken Device (JOI17_broken_device) C++14
0 / 100
69 ms 3312 KB
#include "Annalib.h"

const int MAXN = 150;
const int BITS = 60;

int a[MAXN];
bool bad[MAXN];

void Anna(int n, long long x, int k, int p[]){
    for (int i = 0; i < n; i++) {
        bad[i] = false;
        a[i] = 0;
    }
    for (int i = 0; i < k; i++)
        bad[p[i]] = true;
    for (int i = BITS - 1, j = -1; i >= 0; i--) {
        if (x & (1LL << i))
            j += 2;
        else
            j++;
        while (bad[j])
            j += 2;
        a[j] = 1;
    }
    for (int i = 0; i < n; i++)
        Set(i, a[i]);
}

#include "Brunolib.h"

long long Bruno(int n, int a[]) {
    long long answer = 0;
    int bit = 0;
    for (int i = 0; i < n; i++) {
        if (!a[i])
            bit ^= 1;
        else {
            answer = answer * 2 + bit;
            bit = 0;
        }
    }
    return answer;
}

# 결과 실행 시간 메모리 Grader output
1 Incorrect 36 ms 3072 KB Output isn't correct - L* = 0
2 Incorrect 53 ms 3072 KB Output isn't correct - L* = 0
3 Incorrect 51 ms 3056 KB Output isn't correct - L* = 0
4 Incorrect 57 ms 3312 KB Output isn't correct - L* = 0
5 Incorrect 36 ms 3072 KB Output isn't correct - L* = 0
6 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
7 Incorrect 45 ms 3072 KB Output isn't correct - L* = 0
8 Incorrect 63 ms 3232 KB Output isn't correct - L* = 0
9 Incorrect 46 ms 3072 KB Output isn't correct - L* = 0
10 Incorrect 41 ms 3072 KB Output isn't correct - L* = 0
11 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
12 Incorrect 43 ms 3072 KB Output isn't correct - L* = 0
13 Incorrect 48 ms 3056 KB Output isn't correct - L* = 0
14 Incorrect 39 ms 3072 KB Output isn't correct - L* = 0
15 Partially correct 44 ms 3056 KB Output is partially correct - L* = 16
16 Incorrect 46 ms 3312 KB Output isn't correct - L* = 0
17 Incorrect 59 ms 3064 KB Output isn't correct - L* = 0
18 Incorrect 64 ms 3000 KB Output isn't correct - L* = 0
19 Incorrect 52 ms 3056 KB Output isn't correct - L* = 0
20 Incorrect 38 ms 3056 KB Output isn't correct - L* = 0
21 Incorrect 51 ms 3056 KB Output isn't correct - L* = 0
22 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
23 Incorrect 69 ms 3000 KB Output isn't correct - L* = 0
24 Incorrect 43 ms 2808 KB Output isn't correct - L* = 0
25 Incorrect 51 ms 3176 KB Output isn't correct - L* = 0
26 Incorrect 62 ms 3056 KB Output isn't correct - L* = 0
27 Incorrect 63 ms 3056 KB Output isn't correct - L* = 0
28 Incorrect 47 ms 3056 KB Output isn't correct - L* = 0
29 Incorrect 41 ms 3312 KB Output isn't correct - L* = 0
30 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
31 Incorrect 46 ms 3056 KB Output isn't correct - L* = 0
32 Partially correct 52 ms 3056 KB Output is partially correct - L* = 27
33 Incorrect 43 ms 3056 KB Output isn't correct - L* = 0
34 Incorrect 46 ms 3064 KB Output isn't correct - L* = 0
35 Incorrect 42 ms 3056 KB Output isn't correct - L* = 0
36 Incorrect 38 ms 3072 KB Output isn't correct - L* = 0
37 Incorrect 38 ms 3056 KB Output isn't correct - L* = 0
38 Incorrect 56 ms 3056 KB Output isn't correct - L* = 0
39 Incorrect 54 ms 3104 KB Output isn't correct - L* = 0
40 Partially correct 56 ms 3056 KB Output is partially correct - L* = 16