Submission #753500

# Submission time Handle Problem Language Result Execution time Memory
753500 2023-06-05T11:29:40 Z piOOE Broken Device (JOI17_broken_device) C++17
69 / 100
41 ms 2792 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

constexpr ll Y = 439789002196527822LL;

void Anna(int N, long long X, int K, int P[]) {
    vector<int> a(N), used(N);
    X ^= Y;

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

    for (int i = 0, b = 0; i < N; ++i) {
        if (!used[i] && (X >> b & 1) == (i & 1)) {
            a[i] = 1;
            b += 1;
        }
    }

    for (int i = 0; i < N; i++) {
        Set(i, a[i]);
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

constexpr ll Y = 439789002196527822LL;

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

    for (int i = 0, b = 0; i < N; ++i) {
        if (A[i]) {
            X |= (i & 1LL) << b;
            b += 1;
        }
    }

    X ^= Y;

    return X;
}
# Verdict Execution time Memory Grader output
1 Partially correct 30 ms 2488 KB Output is partially correct - L* = 31
2 Partially correct 31 ms 2656 KB Output is partially correct - L* = 31
3 Partially correct 35 ms 2628 KB Output is partially correct - L* = 32
4 Partially correct 30 ms 2560 KB Output is partially correct - L* = 29
5 Partially correct 27 ms 2596 KB Output is partially correct - L* = 29
6 Partially correct 35 ms 2472 KB Output is partially correct - L* = 31
7 Partially correct 41 ms 2472 KB Output is partially correct - L* = 29
8 Partially correct 33 ms 2484 KB Output is partially correct - L* = 29
9 Partially correct 30 ms 2476 KB Output is partially correct - L* = 29
10 Partially correct 27 ms 2484 KB Output is partially correct - L* = 31
11 Partially correct 27 ms 2528 KB Output is partially correct - L* = 30
12 Partially correct 30 ms 2556 KB Output is partially correct - L* = 34
13 Partially correct 28 ms 2484 KB Output is partially correct - L* = 30
14 Partially correct 31 ms 2500 KB Output is partially correct - L* = 30
15 Partially correct 27 ms 2552 KB Output is partially correct - L* = 36
16 Partially correct 27 ms 2528 KB Output is partially correct - L* = 32
17 Partially correct 28 ms 2552 KB Output is partially correct - L* = 32
18 Partially correct 28 ms 2480 KB Output is partially correct - L* = 30
19 Partially correct 30 ms 2444 KB Output is partially correct - L* = 29
20 Partially correct 27 ms 2508 KB Output is partially correct - L* = 29
21 Partially correct 30 ms 2464 KB Output is partially correct - L* = 30
22 Partially correct 28 ms 2792 KB Output is partially correct - L* = 31
23 Partially correct 31 ms 2472 KB Output is partially correct - L* = 31
24 Partially correct 35 ms 2496 KB Output is partially correct - L* = 30
25 Partially correct 28 ms 2616 KB Output is partially correct - L* = 33
26 Partially correct 28 ms 2716 KB Output is partially correct - L* = 30
27 Partially correct 32 ms 2556 KB Output is partially correct - L* = 29
28 Partially correct 30 ms 2592 KB Output is partially correct - L* = 30
29 Partially correct 30 ms 2604 KB Output is partially correct - L* = 33
30 Partially correct 28 ms 2484 KB Output is partially correct - L* = 32
31 Partially correct 27 ms 2480 KB Output is partially correct - L* = 32
32 Partially correct 28 ms 2480 KB Output is partially correct - L* = 30
33 Partially correct 30 ms 2536 KB Output is partially correct - L* = 32
34 Partially correct 30 ms 2568 KB Output is partially correct - L* = 35
35 Partially correct 28 ms 2540 KB Output is partially correct - L* = 30
36 Partially correct 28 ms 2544 KB Output is partially correct - L* = 33
37 Partially correct 30 ms 2612 KB Output is partially correct - L* = 31
38 Partially correct 28 ms 2472 KB Output is partially correct - L* = 32
39 Partially correct 37 ms 2600 KB Output is partially correct - L* = 33
40 Partially correct 27 ms 2468 KB Output is partially correct - L* = 32