답안 #131690

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
131690 2019-07-17T12:57:27 Z zoooma13 Broken Device (JOI17_broken_device) C++14
0 / 100
56 ms 3152 KB
#include "bits/stdc++.h"
#include "Annalib.h"
using namespace std;

void Anna( int N, long long X, int K, int P[] ){
    srand(8465554);
    vector <int> ord(N);
    iota(ord.begin() ,ord.end() ,0);
    random_shuffle(ord.begin() ,ord.end());

    vector <bool> bad(N, false);
    for(int i=0; i<K; i++)
        bad[P[i]] = true;

    int len = log2(X)+1 ,j = 0;
    vector <bool> enc(N ,0);
    for(int i=0; i<N-1; i++){
        if(bad[i])
            continue;
        bool bit = bool(X&(1LL<<j));
        if(!bit)
        { enc[ord[i]] = 1 ,enc[ord[i+1]] = 0; j++ ,i++; }
        else if(bit && !bad[i+1])
        { enc[ord[i]] = 1 ,enc[ord[i+1]] = 1; j++ ,i++; }
        if(j >= len)
            break;
    }
    for(int i=0; i<N; i++)
        Set(i ,enc[i]);
    //assert(false);
}
#include "bits/stdc++.h"
#include "Brunolib.h"
using namespace std;

long long Bruno( int N, int A[] ){
    srand(8465554);
    vector <int> ord(N);
    iota(ord.begin() ,ord.end() ,0);
    random_shuffle(ord.begin() ,ord.end());

    int j = 0;
    long long X = 0LL;
    for(int i=0; i<N-1; i++){
        if(A[ord[i]])
        { X |= (1LL<<j)*A[ord[i+1]]; j++ ,i++; }
    }
    return X;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
2 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
3 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
4 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
5 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
6 Incorrect 53 ms 3064 KB Output isn't correct - L* = 0
7 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
8 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
9 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
10 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
11 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
12 Incorrect 53 ms 3152 KB Output isn't correct - L* = 0
13 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
14 Incorrect 53 ms 3064 KB Output isn't correct - L* = 0
15 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
16 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
17 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
18 Incorrect 53 ms 2976 KB Output isn't correct - L* = 0
19 Incorrect 53 ms 3000 KB Output isn't correct - L* = 0
20 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
21 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
22 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
23 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
24 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
25 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
26 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
27 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
28 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
29 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
30 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
31 Incorrect 53 ms 3032 KB Output isn't correct - L* = 0
32 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
33 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0
34 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
35 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
36 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
37 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
38 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
39 Incorrect 56 ms 3032 KB Output isn't correct - L* = 0
40 Incorrect 53 ms 3056 KB Output isn't correct - L* = 0