Submission #70119

# Submission time Handle Problem Language Result Execution time Memory
70119 2018-08-22T11:31:42 Z Just_Solve_The_Problem Broken Device (JOI17_broken_device) C++11
0 / 100
71 ms 4072 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 |= (1LL << cur);
      }
      i++;
      cur--;
    }
  }
  return ret;
}
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 3056 KB Output isn't correct - L* = 0
2 Partially correct 52 ms 3360 KB Output is partially correct - L* = 14
3 Partially correct 58 ms 3632 KB Output is partially correct - L* = 14
4 Partially correct 64 ms 3688 KB Output is partially correct - L* = 14
5 Incorrect 47 ms 3688 KB Output isn't correct - L* = 0
6 Incorrect 55 ms 3688 KB Output isn't correct - L* = 0
7 Incorrect 66 ms 3688 KB Output isn't correct - L* = 0
8 Partially correct 54 ms 3840 KB Output is partially correct - L* = 14
9 Incorrect 47 ms 3840 KB Output isn't correct - L* = 0
10 Incorrect 55 ms 3840 KB Output isn't correct - L* = 0
11 Partially correct 45 ms 4064 KB Output is partially correct - L* = 14
12 Partially correct 51 ms 4064 KB Output is partially correct - L* = 14
13 Partially correct 57 ms 4064 KB Output is partially correct - L* = 14
14 Incorrect 51 ms 4064 KB Output isn't correct - L* = 0
15 Partially correct 47 ms 4064 KB Output is partially correct - L* = 14
16 Incorrect 49 ms 4064 KB Output isn't correct - L* = 0
17 Partially correct 41 ms 4064 KB Output is partially correct - L* = 14
18 Incorrect 45 ms 4064 KB Output isn't correct - L* = 0
19 Incorrect 48 ms 4064 KB Output isn't correct - L* = 0
20 Partially correct 71 ms 4064 KB Output is partially correct - L* = 14
21 Incorrect 62 ms 4064 KB Output isn't correct - L* = 0
22 Incorrect 47 ms 4064 KB Output isn't correct - L* = 0
23 Partially correct 51 ms 4064 KB Output is partially correct - L* = 14
24 Incorrect 54 ms 4064 KB Output isn't correct - L* = 0
25 Incorrect 46 ms 4064 KB Output isn't correct - L* = 0
26 Incorrect 56 ms 4064 KB Output isn't correct - L* = 0
27 Incorrect 48 ms 4064 KB Output isn't correct - L* = 0
28 Partially correct 62 ms 4064 KB Output is partially correct - L* = 14
29 Partially correct 52 ms 4064 KB Output is partially correct - L* = 14
30 Partially correct 59 ms 4064 KB Output is partially correct - L* = 14
31 Partially correct 55 ms 4064 KB Output is partially correct - L* = 14
32 Partially correct 56 ms 4064 KB Output is partially correct - L* = 14
33 Partially correct 50 ms 4064 KB Output is partially correct - L* = 14
34 Partially correct 51 ms 4064 KB Output is partially correct - L* = 14
35 Partially correct 44 ms 4072 KB Output is partially correct - L* = 14
36 Partially correct 48 ms 4072 KB Output is partially correct - L* = 14
37 Partially correct 47 ms 4072 KB Output is partially correct - L* = 14
38 Incorrect 45 ms 4072 KB Output isn't correct - L* = 0
39 Incorrect 47 ms 4072 KB Output isn't correct - L* = 0
40 Incorrect 49 ms 4072 KB Output isn't correct - L* = 0