답안 #70118

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

#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;
  }
  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;
        i++;
        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 = 0; i + 1 < N; i++) {
    if (A[i]) {
      if (A[i + 1]) {
        ret |= (1 << cur);
      }
      i++;
      cur--;
    }
  }
  return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 49 ms 2800 KB Output isn't correct - L* = 0
2 Incorrect 46 ms 3608 KB Output isn't correct - L* = 0
3 Incorrect 45 ms 3704 KB Output isn't correct - L* = 0
4 Incorrect 50 ms 3792 KB Output isn't correct - L* = 0
5 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
6 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
7 Incorrect 49 ms 3824 KB Output isn't correct - L* = 0
8 Incorrect 45 ms 3824 KB Output isn't correct - L* = 0
9 Incorrect 43 ms 3824 KB Output isn't correct - L* = 0
10 Incorrect 41 ms 3824 KB Output isn't correct - L* = 0
11 Incorrect 46 ms 3824 KB Output isn't correct - L* = 0
12 Incorrect 47 ms 3824 KB Output isn't correct - L* = 0
13 Incorrect 47 ms 3824 KB Output isn't correct - L* = 0
14 Incorrect 47 ms 3824 KB Output isn't correct - L* = 0
15 Incorrect 45 ms 3824 KB Output isn't correct - L* = 0
16 Incorrect 47 ms 3824 KB Output isn't correct - L* = 0
17 Incorrect 51 ms 3824 KB Output isn't correct - L* = 0
18 Incorrect 44 ms 3824 KB Output isn't correct - L* = 0
19 Incorrect 55 ms 3824 KB Output isn't correct - L* = 0
20 Incorrect 41 ms 3824 KB Output isn't correct - L* = 0
21 Incorrect 45 ms 3824 KB Output isn't correct - L* = 0
22 Incorrect 47 ms 3824 KB Output isn't correct - L* = 0
23 Incorrect 43 ms 3824 KB Output isn't correct - L* = 0
24 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
25 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
26 Incorrect 43 ms 3824 KB Output isn't correct - L* = 0
27 Incorrect 54 ms 3824 KB Output isn't correct - L* = 0
28 Incorrect 45 ms 3824 KB Output isn't correct - L* = 0
29 Incorrect 44 ms 3824 KB Output isn't correct - L* = 0
30 Incorrect 40 ms 3824 KB Output isn't correct - L* = 0
31 Incorrect 74 ms 3824 KB Output isn't correct - L* = 0
32 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
33 Incorrect 46 ms 3824 KB Output isn't correct - L* = 0
34 Incorrect 51 ms 3824 KB Output isn't correct - L* = 0
35 Incorrect 41 ms 3824 KB Output isn't correct - L* = 0
36 Incorrect 48 ms 3824 KB Output isn't correct - L* = 0
37 Incorrect 44 ms 3824 KB Output isn't correct - L* = 0
38 Incorrect 52 ms 3824 KB Output isn't correct - L* = 0
39 Incorrect 44 ms 3824 KB Output isn't correct - L* = 0
40 Incorrect 51 ms 3824 KB Output isn't correct - L* = 0