답안 #753740

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
753740 2023-06-05T20:05:29 Z piOOE Broken Device (JOI17_broken_device) C++17
0 / 100
46 ms 2668 KB
#include "Annalib.h"

void set(int i, int x, int y, int z) {
    Set(i, x), Set(i + 1, y), Set(i + 2, z);
}

void Anna(int N, long long X, int K, int P[]) {
    bool used[150]{};

    for (int i = 0; i < K; ++i) {
        used[P[i]] = true;
    }

    for (int i = 0, c = 0; i < N; i += 3) {
        if (!used[i]) {
            set(i, 1, X >> c & 1, X >> (c + 1) & 1);
            c += 2;
        } else {
            set(i, 0, X >> c & 1, X >> c & 1);
            c += 1;
        }
    }
}
#include "Brunolib.h"

long long Bruno(int N, int A[]) {
    long long X = 0;

    for (int i = 0, c = 0; i < N; i += 3) {
        if (A[i]) {
            X += (A[i + 1] + A[i + 2] * 2LL) << c;
            c += 2;
        } else {
            X += ((long long) (A[i + 1] || A[i + 2])) << c;
            c += 1;
        }
    }

    return X;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 26 ms 2548 KB Output isn't correct - L* = 0
2 Partially correct 26 ms 2644 KB Output isn't correct - L* = 0
3 Partially correct 25 ms 2412 KB Output isn't correct - L* = 0
4 Partially correct 26 ms 2652 KB Output isn't correct - L* = 0
5 Partially correct 26 ms 2536 KB Output isn't correct - L* = 0
6 Partially correct 26 ms 2496 KB Output isn't correct - L* = 0
7 Partially correct 26 ms 2568 KB Output isn't correct - L* = 0
8 Partially correct 28 ms 2552 KB Output isn't correct - L* = 0
9 Partially correct 26 ms 2632 KB Output isn't correct - L* = 0
10 Partially correct 29 ms 2432 KB Output isn't correct - L* = 0
11 Partially correct 27 ms 2524 KB Output isn't correct - L* = 0
12 Partially correct 30 ms 2572 KB Output isn't correct - L* = 0
13 Partially correct 33 ms 2552 KB Output isn't correct - L* = 0
14 Partially correct 31 ms 2500 KB Output isn't correct - L* = 0
15 Partially correct 27 ms 2512 KB Output isn't correct - L* = 0
16 Partially correct 29 ms 2472 KB Output isn't correct - L* = 0
17 Partially correct 46 ms 2476 KB Output isn't correct - L* = 0
18 Partially correct 40 ms 2460 KB Output isn't correct - L* = 0
19 Partially correct 43 ms 2524 KB Output isn't correct - L* = 0
20 Partially correct 28 ms 2460 KB Output isn't correct - L* = 0
21 Partially correct 28 ms 2528 KB Output isn't correct - L* = 0
22 Partially correct 28 ms 2444 KB Output isn't correct - L* = 0
23 Partially correct 43 ms 2416 KB Output isn't correct - L* = 0
24 Partially correct 42 ms 2460 KB Output isn't correct - L* = 0
25 Partially correct 27 ms 2536 KB Output isn't correct - L* = 0
26 Partially correct 38 ms 2432 KB Output isn't correct - L* = 0
27 Partially correct 42 ms 2496 KB Output isn't correct - L* = 0
28 Partially correct 28 ms 2464 KB Output isn't correct - L* = 0
29 Partially correct 33 ms 2508 KB Output isn't correct - L* = 0
30 Partially correct 29 ms 2460 KB Output isn't correct - L* = 0
31 Partially correct 31 ms 2580 KB Output isn't correct - L* = 0
32 Partially correct 27 ms 2584 KB Output isn't correct - L* = 0
33 Partially correct 26 ms 2476 KB Output isn't correct - L* = 0
34 Partially correct 28 ms 2540 KB Output isn't correct - L* = 0
35 Partially correct 32 ms 2636 KB Output isn't correct - L* = 0
36 Partially correct 26 ms 2572 KB Output isn't correct - L* = 0
37 Partially correct 40 ms 2516 KB Output isn't correct - L* = 0
38 Partially correct 33 ms 2576 KB Output isn't correct - L* = 0
39 Partially correct 29 ms 2480 KB Output isn't correct - L* = 0
40 Partially correct 35 ms 2668 KB Output isn't correct - L* = 0