답안 #70125

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

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]) {
        continue;
      } else {
        u[i] = 1;
        cur--;
        i++;
      }
    }
  }
  assert(cur == -1);
  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;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 3 ms 628 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 3 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 3 ms 896 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 3 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Runtime error 4 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Runtime error 4 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 3 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Runtime error 4 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
10 Runtime error 3 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Runtime error 3 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Runtime error 2 ms 1044 KB Execution killed with signal 11 (could be triggered by violating memory limits)
13 Runtime error 2 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
14 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Runtime error 2 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
16 Runtime error 2 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
18 Runtime error 2 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
19 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
21 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
22 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
23 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
24 Runtime error 4 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
25 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
26 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
27 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
28 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
29 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
30 Runtime error 2 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
31 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
32 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
33 Runtime error 3 ms 1080 KB Execution killed with signal 11 (could be triggered by violating memory limits)
34 Runtime error 2 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
35 Runtime error 3 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
36 Runtime error 3 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
37 Runtime error 3 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
38 Runtime error 2 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
39 Runtime error 3 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)
40 Runtime error 2 ms 1084 KB Execution killed with signal 11 (could be triggered by violating memory limits)