답안 #72594

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72594 2018-08-26T10:48:43 Z ikura355 Broken Device (JOI17_broken_device) C++14
41 / 100
83 ms 13712 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;

#define ll long long
const int maxn = 150 + 5;

int bad[maxn];

void Anna(int N, long long X, int K, int P[]) {
    for(int i=0;i<N;i++) bad[i] = 0;
    for(int i=0;i<K;i++) bad[P[i]] = 1;
    int pos = 59;
    for(int i=0;i<N;i+=2) {
        if(bad[i] || bad[i+1] || pos == -1) {
            Set(i,0);
            Set(i+1,0);
        }
        else {
//            printf("Set %d %d\n",1,(X&(1<<pos))!=0);
            Set(i,1);
            if(X&(1LL<<pos)) Set(i+1,1);
            else Set(i+1,0);
            pos--;
        }
    }
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

#define ll long long

ll Bruno(int N, int A[]) {
    ll ans = 0;
    for(int i=0;i<N;i+=2) {
        if(A[i]==1) ans = ans*2 + A[i+1];
    }
//    printf("ans = %lld\n",ans);
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 51 ms 3448 KB Output is partially correct - L* = 15
2 Partially correct 46 ms 4120 KB Output is partially correct - L* = 15
3 Partially correct 51 ms 4280 KB Output is partially correct - L* = 15
4 Partially correct 49 ms 4560 KB Output is partially correct - L* = 15
5 Partially correct 47 ms 4800 KB Output is partially correct - L* = 15
6 Partially correct 54 ms 5536 KB Output is partially correct - L* = 15
7 Partially correct 51 ms 5768 KB Output is partially correct - L* = 15
8 Partially correct 59 ms 5768 KB Output is partially correct - L* = 15
9 Partially correct 62 ms 6264 KB Output is partially correct - L* = 15
10 Partially correct 83 ms 6488 KB Output is partially correct - L* = 15
11 Partially correct 47 ms 6504 KB Output is partially correct - L* = 15
12 Partially correct 50 ms 7096 KB Output is partially correct - L* = 15
13 Partially correct 75 ms 7120 KB Output is partially correct - L* = 15
14 Partially correct 46 ms 7368 KB Output is partially correct - L* = 15
15 Partially correct 46 ms 7608 KB Output is partially correct - L* = 15
16 Partially correct 47 ms 8112 KB Output is partially correct - L* = 15
17 Partially correct 46 ms 8264 KB Output is partially correct - L* = 15
18 Partially correct 58 ms 8344 KB Output is partially correct - L* = 15
19 Partially correct 47 ms 8800 KB Output is partially correct - L* = 15
20 Partially correct 51 ms 9048 KB Output is partially correct - L* = 15
21 Partially correct 66 ms 9088 KB Output is partially correct - L* = 15
22 Partially correct 44 ms 9320 KB Output is partially correct - L* = 15
23 Partially correct 45 ms 9560 KB Output is partially correct - L* = 15
24 Partially correct 47 ms 10064 KB Output is partially correct - L* = 15
25 Partially correct 46 ms 10064 KB Output is partially correct - L* = 15
26 Partially correct 64 ms 10296 KB Output is partially correct - L* = 15
27 Partially correct 70 ms 10536 KB Output is partially correct - L* = 15
28 Partially correct 59 ms 10792 KB Output is partially correct - L* = 15
29 Partially correct 44 ms 11232 KB Output is partially correct - L* = 15
30 Partially correct 47 ms 11272 KB Output is partially correct - L* = 15
31 Partially correct 41 ms 11528 KB Output is partially correct - L* = 15
32 Partially correct 40 ms 12048 KB Output is partially correct - L* = 15
33 Partially correct 45 ms 12152 KB Output is partially correct - L* = 15
34 Partially correct 43 ms 12368 KB Output is partially correct - L* = 15
35 Partially correct 47 ms 12608 KB Output is partially correct - L* = 15
36 Partially correct 48 ms 12864 KB Output is partially correct - L* = 15
37 Partially correct 51 ms 12984 KB Output is partially correct - L* = 16
38 Partially correct 50 ms 13472 KB Output is partially correct - L* = 15
39 Partially correct 53 ms 13472 KB Output is partially correct - L* = 15
40 Partially correct 40 ms 13712 KB Output is partially correct - L* = 15