답안 #100037

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
100037 2019-03-09T06:57:11 Z oolimry Broken Device (JOI17_broken_device) C++14
41 / 100
76 ms 3328 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
void Anna( int N, long long X, int K, int P[] ){
    set<int> bad;
    for(int i = 0;i < K;i++){
        bad.insert(P[i]);
    }
    int bin[60];
    for(int i = 0;i < 60;i++){
        long long f = 1ll << i;

        if(f&X){
            bin[i] = 1;
        }
        else{
            bin[i] = 0;
        }
    }
    int c = 0;
  for( int i = 0; i < N; i++ ){
    if(bad.find(i) != bad.end()) Set(i,0);
    else if(bad.find(i+1) != bad.end()) Set(i,0);
    else{
        if(c == 60){
            Set(i,0);
        }
        else{
            Set(i,1);
            if(i != N-1) Set(i+1,bin[c]);
            c++;
            i++;
        }
    }
  }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno( int N, int A[] ){
  long long ans = 0ll;
  int bin[60];
  int c = 0;
  for(int i = 0;i < N;i++){
    if(A[i] == 0) continue;
    else{
        bin[c] = A[i+1];
        c++;
        i++;
    }
  }

  for(int i = 59;i >= 0;i--){
    ans *= 2ll;
    ans += (long long) bin[i];
  }
//cout << ans;
  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 66 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 57 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 40 ms 3056 KB Output is partially correct - L* = 16
4 Partially correct 38 ms 3072 KB Output is partially correct - L* = 15
5 Partially correct 46 ms 3072 KB Output is partially correct - L* = 15
6 Partially correct 56 ms 3072 KB Output is partially correct - L* = 15
7 Partially correct 51 ms 3056 KB Output is partially correct - L* = 17
8 Partially correct 40 ms 3072 KB Output is partially correct - L* = 16
9 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
10 Partially correct 58 ms 3056 KB Output is partially correct - L* = 15
11 Partially correct 41 ms 3072 KB Output is partially correct - L* = 16
12 Partially correct 46 ms 3016 KB Output is partially correct - L* = 15
13 Partially correct 45 ms 3072 KB Output is partially correct - L* = 15
14 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
15 Partially correct 54 ms 3000 KB Output is partially correct - L* = 15
16 Partially correct 44 ms 3056 KB Output is partially correct - L* = 15
17 Partially correct 47 ms 3072 KB Output is partially correct - L* = 17
18 Partially correct 59 ms 2912 KB Output is partially correct - L* = 15
19 Partially correct 55 ms 3056 KB Output is partially correct - L* = 18
20 Partially correct 47 ms 2800 KB Output is partially correct - L* = 15
21 Partially correct 71 ms 3056 KB Output is partially correct - L* = 15
22 Partially correct 66 ms 3072 KB Output is partially correct - L* = 15
23 Partially correct 44 ms 3072 KB Output is partially correct - L* = 15
24 Partially correct 43 ms 2992 KB Output is partially correct - L* = 16
25 Partially correct 60 ms 3056 KB Output is partially correct - L* = 15
26 Partially correct 54 ms 3072 KB Output is partially correct - L* = 16
27 Partially correct 49 ms 3016 KB Output is partially correct - L* = 15
28 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
29 Partially correct 62 ms 3056 KB Output is partially correct - L* = 15
30 Partially correct 76 ms 2968 KB Output is partially correct - L* = 15
31 Partially correct 48 ms 2888 KB Output is partially correct - L* = 15
32 Partially correct 63 ms 3056 KB Output is partially correct - L* = 16
33 Partially correct 64 ms 3056 KB Output is partially correct - L* = 15
34 Partially correct 62 ms 3056 KB Output is partially correct - L* = 15
35 Partially correct 51 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
37 Partially correct 47 ms 3056 KB Output is partially correct - L* = 16
38 Partially correct 50 ms 3056 KB Output is partially correct - L* = 16
39 Partially correct 45 ms 3328 KB Output is partially correct - L* = 15
40 Partially correct 44 ms 3072 KB Output is partially correct - L* = 15