답안 #231512

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
231512 2020-05-13T21:11:37 Z cstuart Broken Device (JOI17_broken_device) C++17
59 / 100
62 ms 3432 KB
#include <bits/stdc++.h>
using namespace std;
#include "Annalib.h"
 
void Anna (int N, long long X, int K, int P[]) {
  
  bool     func[N+5];
  int      b = 0;
  string   rep = "101010101010100101100101100110011001100110101001011001100101100101100101101010101010011001011001100110100101010110010101011001100110010110011001010110";
  
  memset(func, 1, sizeof func);
  for (int i = 0; i < K; i++) func[P[i]] = 0;
  
  for (int i = 0; i < N; i++) {
    if (b == 60) Set(i, 0);
    else if (!func[i]) Set(i, 0);
    else if (((1ll << b) & X) == 0 && rep[i % (int)rep.length()] == '1') Set(i, 0);
    else if (((1ll << b) & X) > 0  && rep[i % (int)rep.length()] == '0') Set(i, 0);
    else {
      Set(i, 1);
      b++;
    }
  }
  
}
#include <bits/stdc++.h>
using namespace std;
#include "Brunolib.h"
 
long long Bruno (int N, int A[]) {
  
  string     rep = "101010101010100101100101100110011001100110101001011001100101100101100101101010101010011001011001100110100101010110010101011001100110010110011001010110";
  long long  V = 0;
  int        b = 0;
  
  for (int i = 0; i < N; i++) {
    if (A[i] == 1) {
      if (rep[i % (int)rep.length()] == '1') V += (1ll << b);
      b++;
    }
  }
  
  return V;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 54 ms 3168 KB Output is partially correct - L* = 31
2 Partially correct 60 ms 3328 KB Output is partially correct - L* = 33
3 Partially correct 49 ms 3312 KB Output is partially correct - L* = 31
4 Partially correct 49 ms 3328 KB Output is partially correct - L* = 27
5 Partially correct 59 ms 3328 KB Output is partially correct - L* = 34
6 Partially correct 53 ms 3328 KB Output is partially correct - L* = 32
7 Partially correct 57 ms 3280 KB Output is partially correct - L* = 34
8 Partially correct 48 ms 3328 KB Output is partially correct - L* = 35
9 Partially correct 47 ms 3328 KB Output is partially correct - L* = 30
10 Partially correct 52 ms 3312 KB Output is partially correct - L* = 29
11 Partially correct 54 ms 3312 KB Output is partially correct - L* = 34
12 Partially correct 48 ms 3328 KB Output is partially correct - L* = 31
13 Partially correct 47 ms 3312 KB Output is partially correct - L* = 30
14 Partially correct 59 ms 3312 KB Output is partially correct - L* = 28
15 Partially correct 55 ms 3312 KB Output is partially correct - L* = 33
16 Partially correct 47 ms 3328 KB Output is partially correct - L* = 33
17 Partially correct 54 ms 3312 KB Output is partially correct - L* = 34
18 Partially correct 54 ms 3432 KB Output is partially correct - L* = 30
19 Partially correct 60 ms 3312 KB Output is partially correct - L* = 28
20 Partially correct 62 ms 3312 KB Output is partially correct - L* = 31
21 Partially correct 48 ms 3312 KB Output is partially correct - L* = 30
22 Partially correct 50 ms 3328 KB Output is partially correct - L* = 27
23 Partially correct 48 ms 3328 KB Output is partially correct - L* = 32
24 Partially correct 48 ms 3312 KB Output is partially correct - L* = 33
25 Partially correct 59 ms 3320 KB Output is partially correct - L* = 29
26 Partially correct 60 ms 3328 KB Output is partially correct - L* = 34
27 Partially correct 47 ms 3312 KB Output is partially correct - L* = 25
28 Partially correct 48 ms 3328 KB Output is partially correct - L* = 37
29 Partially correct 47 ms 3328 KB Output is partially correct - L* = 35
30 Partially correct 47 ms 3312 KB Output is partially correct - L* = 33
31 Partially correct 55 ms 3320 KB Output is partially correct - L* = 33
32 Partially correct 49 ms 3312 KB Output is partially correct - L* = 33
33 Partially correct 48 ms 3328 KB Output is partially correct - L* = 24
34 Partially correct 48 ms 3264 KB Output is partially correct - L* = 27
35 Partially correct 47 ms 3328 KB Output is partially correct - L* = 34
36 Partially correct 56 ms 3328 KB Output is partially correct - L* = 31
37 Partially correct 48 ms 3328 KB Output is partially correct - L* = 34
38 Partially correct 47 ms 3240 KB Output is partially correct - L* = 30
39 Partially correct 47 ms 3328 KB Output is partially correct - L* = 24
40 Partially correct 50 ms 3328 KB Output is partially correct - L* = 29