Submission #691249

# Submission time Handle Problem Language Result Execution time Memory
691249 2023-01-31T03:42:31 Z tengiz05 Broken Device (JOI17_broken_device) C++17
41 / 100
48 ms 2400 KB
#include "Annalib.h"

using i64 = long long;

void Anna(int n, i64 X, int K, int P[] ){
    bool bad[n] {};
    for (int i = 0; i < K; i++) {
        bad[P[i]] = true;
    }
    
    int cur = 0;
    for (int i = 0; i < n; i += 2) {
        if (!bad[i] && !bad[i + 1]) {
            Set(i, 1);
            Set(i + 1, X >> cur & 1);
            cur++;
        } else {
            Set(i, 0);
            Set(i + 1, 0);
        }
    }
}
#include "Brunolib.h"
#include <iostream>

using i64 = long long;

long long Bruno( int n, int A[] ){
    i64 res = 0;
    int cur = 0;
    for (int i = 0; i < n; i += 2) {
        if (A[i]) {
            res |= (1LL << cur) * A[i + 1];
            cur++;
        }
    }
    return res;
}
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 2280 KB Output is partially correct - L* = 15
2 Partially correct 27 ms 2208 KB Output is partially correct - L* = 15
3 Partially correct 27 ms 2280 KB Output is partially correct - L* = 16
4 Partially correct 27 ms 2248 KB Output is partially correct - L* = 15
5 Partially correct 27 ms 2312 KB Output is partially correct - L* = 15
6 Partially correct 27 ms 2204 KB Output is partially correct - L* = 15
7 Partially correct 27 ms 2312 KB Output is partially correct - L* = 15
8 Partially correct 28 ms 2224 KB Output is partially correct - L* = 15
9 Partially correct 27 ms 2284 KB Output is partially correct - L* = 16
10 Partially correct 27 ms 2244 KB Output is partially correct - L* = 16
11 Partially correct 27 ms 2228 KB Output is partially correct - L* = 15
12 Partially correct 27 ms 2256 KB Output is partially correct - L* = 16
13 Partially correct 27 ms 2224 KB Output is partially correct - L* = 15
14 Partially correct 27 ms 2340 KB Output is partially correct - L* = 15
15 Partially correct 27 ms 2228 KB Output is partially correct - L* = 15
16 Partially correct 30 ms 2400 KB Output is partially correct - L* = 15
17 Partially correct 27 ms 2332 KB Output is partially correct - L* = 15
18 Partially correct 27 ms 2340 KB Output is partially correct - L* = 15
19 Partially correct 27 ms 2236 KB Output is partially correct - L* = 16
20 Partially correct 28 ms 2376 KB Output is partially correct - L* = 15
21 Partially correct 27 ms 2228 KB Output is partially correct - L* = 15
22 Partially correct 28 ms 2328 KB Output is partially correct - L* = 15
23 Partially correct 39 ms 2252 KB Output is partially correct - L* = 15
24 Partially correct 27 ms 2356 KB Output is partially correct - L* = 15
25 Partially correct 28 ms 2392 KB Output is partially correct - L* = 15
26 Partially correct 30 ms 2372 KB Output is partially correct - L* = 15
27 Partially correct 40 ms 2332 KB Output is partially correct - L* = 15
28 Partially correct 28 ms 2276 KB Output is partially correct - L* = 15
29 Partially correct 40 ms 2236 KB Output is partially correct - L* = 15
30 Partially correct 27 ms 2312 KB Output is partially correct - L* = 15
31 Partially correct 39 ms 2148 KB Output is partially correct - L* = 15
32 Partially correct 34 ms 2176 KB Output is partially correct - L* = 16
33 Partially correct 33 ms 2288 KB Output is partially correct - L* = 15
34 Partially correct 28 ms 2292 KB Output is partially correct - L* = 15
35 Partially correct 37 ms 2172 KB Output is partially correct - L* = 15
36 Partially correct 30 ms 2308 KB Output is partially correct - L* = 15
37 Partially correct 31 ms 2308 KB Output is partially correct - L* = 16
38 Partially correct 32 ms 2336 KB Output is partially correct - L* = 15
39 Partially correct 48 ms 2224 KB Output is partially correct - L* = 15
40 Partially correct 40 ms 2316 KB Output is partially correct - L* = 15