Submission #801316

# Submission time Handle Problem Language Result Execution time Memory
801316 2023-08-02T05:33:48 Z phoenix Broken Device (JOI17_broken_device) C++17
41 / 100
29 ms 2424 KB
#include<bits/stdc++.h>
#include "Annalib.h"

using namespace std;

void Anna(int N, long long X, int K, int P[]) {
    vector<bool> bin;
    for(int i = 59; i >= 0; i--) {
        bin.push_back((X >> i & 1));
    }
    
    bool us[N] = {};
    for(int i = 0; i < K; i++) 
        us[P[i]] = 1;
    int lb = 0;
    for(int i = 0; i < N; i++) {
        if(lb == (int)bin.size() || us[i] || i == N - 1 || us[i + 1]) {
            Set(i, 0);
        } else {
            Set(i, 1);
            Set(i + 1, bin[lb++]);
            i++;
        }
    }
}
#include "Brunolib.h"

long long Bruno(int N, int A[] ){
    long long val = 0;
    int l = 0;
    while(l < N) {
        if(A[l]) {
            val = val * 2 + A[++l];
        }
        l++;
    }
    return val;
}
# Verdict Execution time Memory Grader output
1 Partially correct 25 ms 2248 KB Output is partially correct - L* = 15
2 Partially correct 24 ms 2232 KB Output is partially correct - L* = 15
3 Partially correct 25 ms 2264 KB Output is partially correct - L* = 16
4 Partially correct 25 ms 2252 KB Output is partially correct - L* = 15
5 Partially correct 25 ms 2232 KB Output is partially correct - L* = 15
6 Partially correct 26 ms 2372 KB Output is partially correct - L* = 15
7 Partially correct 29 ms 2360 KB Output is partially correct - L* = 15
8 Partially correct 25 ms 2308 KB Output is partially correct - L* = 15
9 Partially correct 25 ms 2300 KB Output is partially correct - L* = 16
10 Partially correct 27 ms 2316 KB Output is partially correct - L* = 15
11 Partially correct 25 ms 2332 KB Output is partially correct - L* = 16
12 Partially correct 28 ms 2292 KB Output is partially correct - L* = 15
13 Partially correct 26 ms 2412 KB Output is partially correct - L* = 15
14 Partially correct 25 ms 2244 KB Output is partially correct - L* = 15
15 Partially correct 25 ms 2268 KB Output is partially correct - L* = 15
16 Partially correct 25 ms 2236 KB Output is partially correct - L* = 15
17 Partially correct 25 ms 2304 KB Output is partially correct - L* = 17
18 Partially correct 25 ms 2368 KB Output is partially correct - L* = 16
19 Partially correct 25 ms 2224 KB Output is partially correct - L* = 18
20 Partially correct 26 ms 2316 KB Output is partially correct - L* = 15
21 Partially correct 24 ms 2312 KB Output is partially correct - L* = 15
22 Partially correct 27 ms 2248 KB Output is partially correct - L* = 15
23 Partially correct 25 ms 2392 KB Output is partially correct - L* = 15
24 Partially correct 27 ms 2248 KB Output is partially correct - L* = 16
25 Partially correct 25 ms 2252 KB Output is partially correct - L* = 15
26 Partially correct 25 ms 2328 KB Output is partially correct - L* = 16
27 Partially correct 25 ms 2256 KB Output is partially correct - L* = 15
28 Partially correct 25 ms 2304 KB Output is partially correct - L* = 15
29 Partially correct 25 ms 2316 KB Output is partially correct - L* = 15
30 Partially correct 25 ms 2300 KB Output is partially correct - L* = 15
31 Partially correct 25 ms 2424 KB Output is partially correct - L* = 15
32 Partially correct 27 ms 2248 KB Output is partially correct - L* = 15
33 Partially correct 26 ms 2244 KB Output is partially correct - L* = 15
34 Partially correct 25 ms 2324 KB Output is partially correct - L* = 15
35 Partially correct 26 ms 2312 KB Output is partially correct - L* = 15
36 Partially correct 25 ms 2300 KB Output is partially correct - L* = 15
37 Partially correct 25 ms 2228 KB Output is partially correct - L* = 16
38 Partially correct 24 ms 2248 KB Output is partially correct - L* = 17
39 Partially correct 24 ms 2248 KB Output is partially correct - L* = 15
40 Partially correct 27 ms 2360 KB Output is partially correct - L* = 15