Submission #131605

# Submission time Handle Problem Language Result Execution time Memory
131605 2019-07-17T10:19:47 Z Osama_Alkhodairy Broken Device (JOI17_broken_device) C++17
0 / 100
3 ms 532 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){
        assert(0 <= x && x < N);
        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 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 2 ms 380 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
10 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
13 Runtime error 3 ms 476 KB Execution killed with signal 11 (could be triggered by violating memory limits)
14 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
16 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
18 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
19 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
21 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
22 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
23 Runtime error 2 ms 500 KB Execution killed with signal 11 (could be triggered by violating memory limits)
24 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
25 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
26 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
27 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
28 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
30 Runtime error 3 ms 532 KB Execution killed with signal 11 (could be triggered by violating memory limits)
31 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
32 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
33 Runtime error 2 ms 508 KB Execution killed with signal 11 (could be triggered by violating memory limits)
34 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
35 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
36 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
37 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
38 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
39 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
40 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)