답안 #231501

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
231501 2020-05-13T20:21:32 Z cstuart Broken Device (JOI17_broken_device) C++17
8 / 100
49 ms 3328 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 = "011100110001010001010000100100101101110000101011110011011001100111001000111001100111110001100110011111000011101101110010010001111110110001100010001101";
  
  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 = "011100110001010001010000100100101101110000101011110011011001100111001000111001100111110001100110011111000011101101110010010001111110110001100010001101";
  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 47 ms 3328 KB Output is partially correct - L* = 23
2 Partially correct 46 ms 2816 KB Output is partially correct - L* = 17
3 Partially correct 46 ms 3056 KB Output is partially correct - L* = 23
4 Partially correct 46 ms 3056 KB Output is partially correct - L* = 17
5 Partially correct 47 ms 3072 KB Output is partially correct - L* = 18
6 Partially correct 47 ms 3072 KB Output is partially correct - L* = 16
7 Partially correct 48 ms 3072 KB Output is partially correct - L* = 20
8 Partially correct 46 ms 3072 KB Output is partially correct - L* = 24
9 Partially correct 47 ms 3072 KB Output is partially correct - L* = 21
10 Partially correct 46 ms 3312 KB Output is partially correct - L* = 18
11 Partially correct 46 ms 3072 KB Output is partially correct - L* = 18
12 Partially correct 47 ms 3072 KB Output is partially correct - L* = 14
13 Partially correct 46 ms 3136 KB Output is partially correct - L* = 23
14 Partially correct 46 ms 3072 KB Output is partially correct - L* = 22
15 Partially correct 46 ms 3072 KB Output is partially correct - L* = 15
16 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
17 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
18 Partially correct 47 ms 3072 KB Output is partially correct - L* = 21
19 Partially correct 46 ms 3072 KB Output is partially correct - L* = 19
20 Partially correct 46 ms 3072 KB Output is partially correct - L* = 18
21 Partially correct 46 ms 3064 KB Output is partially correct - L* = 18
22 Partially correct 46 ms 3072 KB Output is partially correct - L* = 17
23 Partially correct 47 ms 3072 KB Output is partially correct - L* = 14
24 Partially correct 47 ms 3008 KB Output is partially correct - L* = 14
25 Partially correct 47 ms 3312 KB Output is partially correct - L* = 21
26 Partially correct 49 ms 3072 KB Output is partially correct - L* = 25
27 Partially correct 48 ms 3056 KB Output is partially correct - L* = 18
28 Partially correct 46 ms 3072 KB Output is partially correct - L* = 22
29 Partially correct 48 ms 3072 KB Output is partially correct - L* = 18
30 Partially correct 46 ms 3072 KB Output is partially correct - L* = 20
31 Partially correct 47 ms 3056 KB Output is partially correct - L* = 19
32 Partially correct 46 ms 2920 KB Output is partially correct - L* = 18
33 Partially correct 49 ms 3072 KB Output is partially correct - L* = 18
34 Partially correct 46 ms 3056 KB Output is partially correct - L* = 19
35 Partially correct 47 ms 3072 KB Output is partially correct - L* = 18
36 Partially correct 47 ms 3072 KB Output is partially correct - L* = 18
37 Partially correct 48 ms 3072 KB Output is partially correct - L* = 16
38 Partially correct 46 ms 3056 KB Output is partially correct - L* = 19
39 Partially correct 48 ms 3112 KB Output is partially correct - L* = 19
40 Partially correct 47 ms 3072 KB Output is partially correct - L* = 20