답안 #131620

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
131620 2019-07-17T10:36:46 Z Osama_Alkhodairy Broken Device (JOI17_broken_device) C++17
0 / 100
5 ms 1016 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);
        //~ 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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 760 KB Wrong Answer [1]
2 Incorrect 4 ms 760 KB Wrong Answer [1]
3 Incorrect 4 ms 888 KB Wrong Answer [1]
4 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Incorrect 4 ms 768 KB Wrong Answer [1]
6 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Incorrect 4 ms 512 KB Wrong Answer [1]
8 Incorrect 4 ms 760 KB Wrong Answer [1]
9 Incorrect 4 ms 888 KB Wrong Answer [1]
10 Incorrect 4 ms 888 KB Wrong Answer [1]
11 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Incorrect 4 ms 760 KB Wrong Answer [1]
13 Incorrect 4 ms 632 KB Wrong Answer [1]
14 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Incorrect 4 ms 888 KB Wrong Answer [1]
16 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Incorrect 4 ms 888 KB Wrong Answer [1]
18 Incorrect 4 ms 632 KB Wrong Answer [1]
19 Incorrect 5 ms 888 KB Wrong Answer [1]
20 Incorrect 4 ms 760 KB Wrong Answer [1]
21 Incorrect 4 ms 632 KB Wrong Answer [1]
22 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
23 Incorrect 4 ms 760 KB Wrong Answer [1]
24 Incorrect 4 ms 760 KB Wrong Answer [1]
25 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
26 Incorrect 4 ms 760 KB Wrong Answer [1]
27 Incorrect 4 ms 760 KB Wrong Answer [1]
28 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
30 Incorrect 4 ms 632 KB Wrong Answer [1]
31 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
32 Incorrect 4 ms 888 KB Wrong Answer [1]
33 Incorrect 4 ms 888 KB Wrong Answer [1]
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 Incorrect 4 ms 1016 KB Wrong Answer [1]
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 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)