답안 #70117

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
70117 2018-08-22T11:25:21 Z Just_Solve_The_Problem Broken Device (JOI17_broken_device) C++11
0 / 100
77 ms 13328 KB
#include <bits/stdc++.h>
#include "Annalib.h"

#define ll long long

using namespace std;

void Anna( int N, long long X, int K, int P[] ){
  vector < int > used(N, 0);
  vector < int > u(N, 0);
  for (int i = 0; i < K; i++) {
    used[P[i]] = 1;
    u[P[i]] = 0;
  }
  int cur = 59;
  for (int i = 0; i + 1 < N && cur >= 0; i++) {
    if ((X >> cur) & 1) {
      if (used[i] || used[i + 1]) {
        continue;
      } else {
        u[i] = u[i + 1] = 1;
        cur--;
      }
    } else {
      if (used[i] || u[i - 1] == 1) {
        continue;
      } else {
        u[i] = 1;
        cur--;
        i++;
      }
    }
  }
  for (int i = 0; i < N; i++) {
    Set(i, u[i]);
  }
}
#include <bits/stdc++.h>
#include "Brunolib.h"

#define ll long long

using namespace std;

long long Bruno( int N, int A[] ){
  ll ret = 0;
  int cur = 59;
  for (int i = 1; i < N; i++) {
    if (A[i]) {
      if (A[i + 1]) {
        ret |= (1 << cur);
      }
      cur--;
    }
  }
  return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 49 ms 3064 KB Output isn't correct - L* = 0
2 Incorrect 55 ms 3856 KB Output isn't correct - L* = 0
3 Incorrect 51 ms 4248 KB Output isn't correct - L* = 0
4 Incorrect 47 ms 4512 KB Output isn't correct - L* = 0
5 Incorrect 50 ms 5056 KB Output isn't correct - L* = 0
6 Incorrect 48 ms 5136 KB Output isn't correct - L* = 0
7 Incorrect 56 ms 5208 KB Output isn't correct - L* = 0
8 Incorrect 70 ms 5720 KB Output isn't correct - L* = 0
9 Incorrect 59 ms 5752 KB Output isn't correct - L* = 0
10 Incorrect 47 ms 5992 KB Output isn't correct - L* = 0
11 Incorrect 51 ms 6256 KB Output isn't correct - L* = 0
12 Incorrect 45 ms 6488 KB Output isn't correct - L* = 0
13 Incorrect 53 ms 6752 KB Output isn't correct - L* = 0
14 Incorrect 48 ms 7008 KB Output isn't correct - L* = 0
15 Incorrect 45 ms 7240 KB Output isn't correct - L* = 0
16 Incorrect 51 ms 7480 KB Output isn't correct - L* = 0
17 Incorrect 67 ms 7728 KB Output isn't correct - L* = 0
18 Incorrect 62 ms 7984 KB Output isn't correct - L* = 0
19 Incorrect 53 ms 8208 KB Output isn't correct - L* = 0
20 Incorrect 48 ms 8456 KB Output isn't correct - L* = 0
21 Incorrect 44 ms 8704 KB Output isn't correct - L* = 0
22 Incorrect 45 ms 8944 KB Output isn't correct - L* = 0
23 Incorrect 77 ms 9192 KB Output isn't correct - L* = 0
24 Incorrect 63 ms 9424 KB Output isn't correct - L* = 0
25 Incorrect 52 ms 9928 KB Output isn't correct - L* = 0
26 Incorrect 58 ms 9928 KB Output isn't correct - L* = 0
27 Incorrect 54 ms 10424 KB Output isn't correct - L* = 0
28 Incorrect 53 ms 10672 KB Output isn't correct - L* = 0
29 Incorrect 47 ms 10672 KB Output isn't correct - L* = 0
30 Incorrect 48 ms 10896 KB Output isn't correct - L* = 0
31 Incorrect 49 ms 11136 KB Output isn't correct - L* = 0
32 Incorrect 53 ms 11648 KB Output isn't correct - L* = 0
33 Incorrect 50 ms 11648 KB Output isn't correct - L* = 0
34 Incorrect 55 ms 12120 KB Output isn't correct - L* = 0
35 Incorrect 65 ms 12344 KB Output isn't correct - L* = 0
36 Incorrect 52 ms 12368 KB Output isn't correct - L* = 0
37 Incorrect 60 ms 12616 KB Output isn't correct - L* = 0
38 Incorrect 56 ms 12856 KB Output isn't correct - L* = 0
39 Incorrect 52 ms 13096 KB Output isn't correct - L* = 0
40 Incorrect 50 ms 13328 KB Output isn't correct - L* = 0