Submission #106670

# Submission time Handle Problem Language Result Execution time Memory
106670 2019-04-19T14:45:45 Z thebes Broken Device (JOI17_broken_device) C++14
8 / 100
68 ms 3208 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

int lol[200], i, j;
void Anna(int N, long long X, int K, int *P){
    memset(lol, 0, sizeof(lol));
    for(i=0;i<K;i++) lol[P[i]]=1;
    j = 60;
    for(i=0;i<N;i+=2){
        if(j<0){
            Set(i, 0);
            Set(i+1, 0);
            continue;
        }
        if((1LL<<j)&X){
            if(j>=1&&((1LL<<(j-1))&X)&&!lol[i+1]&&!lol[i]){
                Set(i, 1);
                Set(i+1, 1);
                j-=2;
            }
            else if(!lol[i]){
                Set(i, 1);
                Set(i+1, 0);
                j--;
            }
            else{
                Set(i, 0);
                Set(i+1, 0);
            }
        }
        else{
            if(!lol[i+1]){
                Set(i, 0);
                Set(i+1, 1);
                j--;
            }
            else{
                Set(i, 0);
                Set(i+1, 0);
            }
        }
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

long long Bruno(int N, int *A){
    long long ans = 0;
    int j = 60;
    for(int i=0;i<N;i+=2){
      	if(A[i]==A[i+1]&&A[i]==1){
          	ans += (1LL<<j);
          	ans += (1LL<<(j-1));
          	j -= 2;
        }
        else if(A[i]!=A[i+1]&&j>=0){
            if(A[i]==1) ans += (1LL<<j);
            j--;
        }
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 46 ms 3072 KB Output is partially correct - L* = 15
2 Partially correct 50 ms 3112 KB Output is partially correct - L* = 16
3 Partially correct 41 ms 3072 KB Output is partially correct - L* = 25
4 Partially correct 51 ms 3064 KB Output is partially correct - L* = 16
5 Partially correct 68 ms 3056 KB Output is partially correct - L* = 17
6 Partially correct 59 ms 2936 KB Output is partially correct - L* = 22
7 Partially correct 51 ms 3208 KB Output is partially correct - L* = 18
8 Partially correct 50 ms 3056 KB Output is partially correct - L* = 27
9 Partially correct 57 ms 3072 KB Output is partially correct - L* = 19
10 Partially correct 59 ms 3056 KB Output is partially correct - L* = 16
11 Partially correct 64 ms 3000 KB Output is partially correct - L* = 17
12 Partially correct 42 ms 3056 KB Output is partially correct - L* = 14
13 Partially correct 56 ms 3056 KB Output is partially correct - L* = 18
14 Partially correct 54 ms 3072 KB Output is partially correct - L* = 15
15 Partially correct 57 ms 3056 KB Output is partially correct - L* = 24
16 Partially correct 44 ms 3056 KB Output is partially correct - L* = 17
17 Partially correct 43 ms 3056 KB Output is partially correct - L* = 26
18 Partially correct 48 ms 3064 KB Output is partially correct - L* = 16
19 Partially correct 52 ms 3072 KB Output is partially correct - L* = 18
20 Partially correct 49 ms 3056 KB Output is partially correct - L* = 18
21 Partially correct 48 ms 3056 KB Output is partially correct - L* = 15
22 Partially correct 43 ms 3056 KB Output is partially correct - L* = 21
23 Partially correct 45 ms 3000 KB Output is partially correct - L* = 20
24 Partially correct 36 ms 3072 KB Output is partially correct - L* = 18
25 Partially correct 61 ms 3056 KB Output is partially correct - L* = 14
26 Partially correct 61 ms 3056 KB Output is partially correct - L* = 16
27 Partially correct 53 ms 3056 KB Output is partially correct - L* = 16
28 Partially correct 52 ms 3072 KB Output is partially correct - L* = 16
29 Partially correct 60 ms 3056 KB Output is partially correct - L* = 16
30 Partially correct 66 ms 3000 KB Output is partially correct - L* = 23
31 Partially correct 44 ms 3056 KB Output is partially correct - L* = 18
32 Partially correct 50 ms 3072 KB Output is partially correct - L* = 18
33 Partially correct 52 ms 3056 KB Output is partially correct - L* = 18
34 Partially correct 47 ms 3056 KB Output is partially correct - L* = 16
35 Partially correct 39 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 48 ms 3072 KB Output is partially correct - L* = 20
37 Partially correct 41 ms 3056 KB Output is partially correct - L* = 24
38 Partially correct 53 ms 3088 KB Output is partially correct - L* = 26
39 Partially correct 51 ms 3056 KB Output is partially correct - L* = 19
40 Partially correct 57 ms 3056 KB Output is partially correct - L* = 17