답안 #102634

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
102634 2019-03-26T12:20:58 Z alexpetrescu Broken Device (JOI17_broken_device) C++14
43 / 100
62 ms 3328 KB
#include "Annalib.h"

void Anna( int N, long long X, int K, int P[] ){
    int poz = 0, b = 59;
    bool bit = 0;
    for (int i = 0; i < N; i++) {
        if (poz < K && P[poz] == i) {
            bit ^= 1;
            Set(i, 0);
            poz++;
        } else if (b >= 0 && bit == bool((1LL << b) & X)) {
            bit = 0;
            Set(i, 1);
            b--;
        } else {
            bit ^= 1;
            Set(i, 0);
        }
    }
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
    bool bit = 0;
    long long ans = 0;
    for (int i = 0; i < N; i++) {
        if (A[i] == 0)
            bit ^= 1;
        else {
            ans = 2 * ans + bit;
            bit = 0;
        }
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 36 ms 3072 KB Output is partially correct - L* = 29
2 Partially correct 38 ms 2816 KB Output is partially correct - L* = 17
3 Partially correct 36 ms 3072 KB Output is partially correct - L* = 28
4 Partially correct 39 ms 3072 KB Output is partially correct - L* = 18
5 Partially correct 62 ms 2856 KB Output is partially correct - L* = 20
6 Partially correct 39 ms 2800 KB Output is partially correct - L* = 17
7 Partially correct 39 ms 3056 KB Output is partially correct - L* = 23
8 Partially correct 52 ms 2800 KB Output is partially correct - L* = 30
9 Partially correct 50 ms 3056 KB Output is partially correct - L* = 25
10 Partially correct 39 ms 2816 KB Output is partially correct - L* = 28
11 Partially correct 54 ms 3312 KB Output is partially correct - L* = 31
12 Partially correct 53 ms 3000 KB Output is partially correct - L* = 28
13 Partially correct 53 ms 3328 KB Output is partially correct - L* = 28
14 Partially correct 45 ms 3056 KB Output is partially correct - L* = 19
15 Partially correct 43 ms 2816 KB Output is partially correct - L* = 32
16 Partially correct 47 ms 2816 KB Output is partially correct - L* = 18
17 Partially correct 37 ms 2816 KB Output is partially correct - L* = 17
18 Partially correct 55 ms 2800 KB Output is partially correct - L* = 16
19 Partially correct 41 ms 3056 KB Output is partially correct - L* = 19
20 Partially correct 37 ms 3072 KB Output is partially correct - L* = 27
21 Partially correct 40 ms 3056 KB Output is partially correct - L* = 29
22 Partially correct 39 ms 3056 KB Output is partially correct - L* = 25
23 Partially correct 57 ms 2800 KB Output is partially correct - L* = 26
24 Partially correct 43 ms 3056 KB Output is partially correct - L* = 22
25 Partially correct 37 ms 3072 KB Output is partially correct - L* = 16
26 Partially correct 55 ms 3056 KB Output is partially correct - L* = 23
27 Partially correct 50 ms 3008 KB Output is partially correct - L* = 16
28 Partially correct 54 ms 3056 KB Output is partially correct - L* = 30
29 Partially correct 51 ms 3072 KB Output is partially correct - L* = 25
30 Partially correct 40 ms 2960 KB Output is partially correct - L* = 26
31 Partially correct 40 ms 3072 KB Output is partially correct - L* = 32
32 Partially correct 53 ms 2816 KB Output is partially correct - L* = 27
33 Partially correct 43 ms 3072 KB Output is partially correct - L* = 30
34 Partially correct 39 ms 3056 KB Output is partially correct - L* = 26
35 Partially correct 37 ms 3072 KB Output is partially correct - L* = 26
36 Partially correct 47 ms 3056 KB Output is partially correct - L* = 20
37 Partially correct 41 ms 3056 KB Output is partially correct - L* = 16
38 Partially correct 41 ms 3056 KB Output is partially correct - L* = 25
39 Partially correct 45 ms 3072 KB Output is partially correct - L* = 26
40 Partially correct 38 ms 3128 KB Output is partially correct - L* = 25