Submission #102637

# Submission time Handle Problem Language Result Execution time Memory
102637 2019-03-26T12:31:03 Z alexpetrescu Broken Device (JOI17_broken_device) C++14
41 / 100
61 ms 3144 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)) {
            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;
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 55 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 37 ms 3072 KB Output is partially correct - L* = 18
3 Partially correct 51 ms 3056 KB Output is partially correct - L* = 29
4 Partially correct 53 ms 3056 KB Output is partially correct - L* = 16
5 Partially correct 41 ms 3072 KB Output is partially correct - L* = 29
6 Partially correct 51 ms 3104 KB Output is partially correct - L* = 28
7 Partially correct 60 ms 3056 KB Output is partially correct - L* = 25
8 Partially correct 40 ms 3056 KB Output is partially correct - L* = 22
9 Partially correct 42 ms 3072 KB Output is partially correct - L* = 20
10 Partially correct 37 ms 3072 KB Output is partially correct - L* = 16
11 Partially correct 45 ms 3072 KB Output is partially correct - L* = 26
12 Partially correct 38 ms 3056 KB Output is partially correct - L* = 28
13 Partially correct 47 ms 3056 KB Output is partially correct - L* = 28
14 Partially correct 37 ms 3072 KB Output is partially correct - L* = 15
15 Partially correct 44 ms 3072 KB Output is partially correct - L* = 15
16 Partially correct 38 ms 2952 KB Output is partially correct - L* = 16
17 Partially correct 39 ms 3072 KB Output is partially correct - L* = 25
18 Partially correct 36 ms 3072 KB Output is partially correct - L* = 17
19 Partially correct 41 ms 3056 KB Output is partially correct - L* = 19
20 Partially correct 53 ms 3072 KB Output is partially correct - L* = 18
21 Partially correct 61 ms 2904 KB Output is partially correct - L* = 15
22 Partially correct 41 ms 3072 KB Output is partially correct - L* = 25
23 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
24 Partially correct 38 ms 3056 KB Output is partially correct - L* = 25
25 Partially correct 38 ms 2872 KB Output is partially correct - L* = 15
26 Partially correct 38 ms 3112 KB Output is partially correct - L* = 16
27 Partially correct 40 ms 3056 KB Output is partially correct - L* = 16
28 Partially correct 51 ms 3072 KB Output is partially correct - L* = 20
29 Partially correct 50 ms 3056 KB Output is partially correct - L* = 16
30 Partially correct 46 ms 3144 KB Output is partially correct - L* = 18
31 Partially correct 38 ms 3056 KB Output is partially correct - L* = 26
32 Partially correct 38 ms 3056 KB Output is partially correct - L* = 26
33 Partially correct 55 ms 3072 KB Output is partially correct - L* = 18
34 Partially correct 43 ms 3000 KB Output is partially correct - L* = 16
35 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 43 ms 3072 KB Output is partially correct - L* = 26
37 Partially correct 47 ms 3056 KB Output is partially correct - L* = 22
38 Partially correct 58 ms 2928 KB Output is partially correct - L* = 26
39 Partially correct 43 ms 2968 KB Output is partially correct - L* = 21
40 Partially correct 49 ms 3000 KB Output is partially correct - L* = 17