Submission #954888

# Submission time Handle Problem Language Result Execution time Memory
954888 2024-03-28T18:53:54 Z Skywk Broken Device (JOI17_broken_device) C++17
0 / 100
1 ms 604 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

void Anna(int N, long long X, int K, int P[]){
    vector<int> A(150), B(150);
    for(int i=0; i<K; i++){
        B[P[i]] = 1;
    }
    for(int i=0, j=0; j < 60;){
        if(B[i]){
            i++;
            continue;
        }
        if(B[i + 1]){
            if((X >> j) & 1){
                i += 2;
                continue;
            }
        }
        A[i] = 1;
        A[i + 1] = (X >> j) & 1;
        j++;
        i += 2;
    }
    for(int i=0; i<N; i++){
        Set(i, A[i]);
    }
}
#include "Brunolib.h"

long long Bruno(int N, int A[]){
    long long X = 0;
    for(int i=0, j=0; j < 60;){
        if(A[i]){
            if(A[i + 1]) X += (1LL << j);
            j++;
            i += 2;
        }
        else{
            i++;
        }
    }
    return X;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Runtime error 1 ms 348 KB Execution killed with signal 6
3 Runtime error 1 ms 604 KB Execution killed with signal 6
4 Runtime error 1 ms 604 KB Execution killed with signal 6
5 Runtime error 1 ms 348 KB Execution killed with signal 6
6 Runtime error 1 ms 604 KB Execution killed with signal 6
7 Runtime error 1 ms 348 KB Execution killed with signal 6
8 Runtime error 1 ms 348 KB Execution killed with signal 6
9 Runtime error 1 ms 348 KB Execution killed with signal 6
10 Runtime error 1 ms 348 KB Execution killed with signal 6
11 Runtime error 1 ms 600 KB Execution killed with signal 6
12 Runtime error 1 ms 604 KB Execution killed with signal 6
13 Runtime error 1 ms 604 KB Execution killed with signal 6
14 Runtime error 1 ms 600 KB Execution killed with signal 6
15 Runtime error 1 ms 348 KB Execution killed with signal 6
16 Runtime error 1 ms 604 KB Execution killed with signal 6
17 Runtime error 1 ms 348 KB Execution killed with signal 6
18 Runtime error 1 ms 348 KB Execution killed with signal 6
19 Runtime error 1 ms 604 KB Execution killed with signal 6
20 Runtime error 1 ms 604 KB Execution killed with signal 6
21 Runtime error 1 ms 348 KB Execution killed with signal 6
22 Runtime error 1 ms 348 KB Execution killed with signal 6
23 Runtime error 1 ms 348 KB Execution killed with signal 6
24 Runtime error 1 ms 348 KB Execution killed with signal 6
25 Runtime error 1 ms 348 KB Execution killed with signal 6
26 Runtime error 1 ms 344 KB Execution killed with signal 6
27 Runtime error 1 ms 348 KB Execution killed with signal 6
28 Runtime error 1 ms 600 KB Execution killed with signal 6
29 Runtime error 1 ms 348 KB Execution killed with signal 6
30 Runtime error 1 ms 348 KB Execution killed with signal 6
31 Runtime error 1 ms 348 KB Execution killed with signal 6
32 Runtime error 1 ms 604 KB Execution killed with signal 6
33 Runtime error 1 ms 544 KB Execution killed with signal 6
34 Runtime error 1 ms 348 KB Execution killed with signal 6
35 Runtime error 1 ms 348 KB Execution killed with signal 6
36 Runtime error 1 ms 604 KB Execution killed with signal 6
37 Runtime error 1 ms 604 KB Execution killed with signal 6
38 Runtime error 1 ms 348 KB Execution killed with signal 6
39 Runtime error 1 ms 604 KB Execution killed with signal 6
40 Runtime error 1 ms 348 KB Execution killed with signal 6