Submission #131634

# Submission time Handle Problem Language Result Execution time Memory
131634 2019-07-17T10:52:55 Z zoooma13 Broken Device (JOI17_broken_device) C++14
0 / 100
59 ms 3720 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[ord[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;
}
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 3312 KB Output isn't correct - L* = 0
2 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
3 Incorrect 54 ms 3056 KB Output isn't correct - L* = 0
4 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
5 Incorrect 54 ms 3256 KB Output isn't correct - L* = 0
6 Incorrect 56 ms 3256 KB Output isn't correct - L* = 0
7 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
8 Incorrect 56 ms 3312 KB Output isn't correct - L* = 0
9 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
10 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
11 Incorrect 54 ms 3264 KB Output isn't correct - L* = 0
12 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
13 Incorrect 55 ms 3312 KB Output isn't correct - L* = 0
14 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
15 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
16 Incorrect 54 ms 3304 KB Output isn't correct - L* = 0
17 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
18 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
19 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
20 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
21 Incorrect 54 ms 3256 KB Output isn't correct - L* = 0
22 Incorrect 55 ms 3312 KB Output isn't correct - L* = 0
23 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
24 Incorrect 54 ms 3256 KB Output isn't correct - L* = 0
25 Incorrect 55 ms 3512 KB Output isn't correct - L* = 0
26 Incorrect 58 ms 3312 KB Output isn't correct - L* = 0
27 Incorrect 59 ms 3312 KB Output isn't correct - L* = 0
28 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
29 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
30 Incorrect 54 ms 3320 KB Output isn't correct - L* = 0
31 Incorrect 54 ms 3720 KB Output isn't correct - L* = 0
32 Incorrect 54 ms 3328 KB Output isn't correct - L* = 0
33 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
34 Incorrect 56 ms 3056 KB Output isn't correct - L* = 0
35 Incorrect 54 ms 3568 KB Output isn't correct - L* = 0
36 Incorrect 54 ms 3312 KB Output isn't correct - L* = 0
37 Incorrect 54 ms 3144 KB Output isn't correct - L* = 0
38 Incorrect 55 ms 3256 KB Output isn't correct - L* = 0
39 Incorrect 55 ms 3312 KB Output isn't correct - L* = 0
40 Incorrect 54 ms 3320 KB Output isn't correct - L* = 0