Submission #131609

# Submission time Handle Problem Language Result Execution time Memory
131609 2019-07-17T10:26:50 Z Osama_Alkhodairy Broken Device (JOI17_broken_device) C++17
41 / 100
51 ms 3312 KB
#include <bits/stdc++.h>
//~ #include "grader.cpp"
//~ #include "Bruno.cpp"
#include "Annalib.h"
using namespace std;

void Anna( int N, long long X, int K, int P[] ){
    auto set = [&](int x, int y){
        if(x < 0 || x >= N) return;
        Set(x, y);
    };
    vector <int> p;
    for(int i = 0 ; i < K ; i++){
        p.push_back(P[i]);
    }
    int ind = 0;
    for(int i = 59 ; i >= 0 ; i--){
        if(count(p.begin(), p.end(), ind + 1)){
            Set(ind++, 0);
            i++;
            continue;
        }
        if(count(p.begin(), p.end(), ind)){
            Set(ind++, 0);
            i++;
            continue;
        }
        set(ind++, 1);
        set(ind++, (X >> i) & 1);
    }
    while(ind < N) set(ind++, 0);
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
#define ll long long

long long Bruno( int N, int A[] ){
    ll ret = 0;
    int ind = 0;
    while(ind < N){
        if(A[ind] == 0){
            ind++;
            continue;
        }
        ret = ret * 2 + A[ind + 1];
        ind += 2;
    }
    return ret;
}
# Verdict Execution time Memory Grader output
1 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 45 ms 3056 KB Output is partially correct - L* = 16
4 Partially correct 45 ms 3064 KB Output is partially correct - L* = 15
5 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
6 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
7 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
8 Partially correct 51 ms 3056 KB Output is partially correct - L* = 15
9 Partially correct 47 ms 3056 KB Output is partially correct - L* = 16
10 Partially correct 51 ms 3056 KB Output is partially correct - L* = 15
11 Partially correct 47 ms 3312 KB Output is partially correct - L* = 16
12 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
13 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
14 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
15 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
16 Partially correct 46 ms 3072 KB Output is partially correct - L* = 15
17 Partially correct 48 ms 3056 KB Output is partially correct - L* = 17
18 Partially correct 46 ms 3056 KB Output is partially correct - L* = 16
19 Partially correct 49 ms 3056 KB Output is partially correct - L* = 18
20 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
21 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
22 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
23 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
24 Partially correct 46 ms 3056 KB Output is partially correct - L* = 16
25 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
26 Partially correct 46 ms 3056 KB Output is partially correct - L* = 16
27 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
28 Partially correct 46 ms 2856 KB Output is partially correct - L* = 15
29 Partially correct 45 ms 3000 KB Output is partially correct - L* = 15
30 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
31 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
32 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
33 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
34 Partially correct 45 ms 3312 KB Output is partially correct - L* = 15
35 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
37 Partially correct 46 ms 2896 KB Output is partially correct - L* = 16
38 Partially correct 45 ms 2888 KB Output is partially correct - L* = 16
39 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
40 Partially correct 45 ms 3064 KB Output is partially correct - L* = 15