답안 #718832

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
718832 2023-04-05T00:41:42 Z Hacv16 Broken Device (JOI17_broken_device) C++17
41 / 100
40 ms 2596 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

void Anna(int N, ll X, int K, int P[]){
    vector<bool> blocked(N);

    for(int i = 0; i < K; i++){
        int curBit = P[i];
        blocked[curBit] = true;
    }

    for(int i = 0, j = 0; i < N; i += 2){
        if(blocked[i] || (i != N - 1 && blocked[i + 1])){ Set(i, 0); Set(i + 1, 0); }
        else{ int bitOn = (bool)((1LL << j) & X); Set(i, 1); Set(i + 1, bitOn); j++; }
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>

typedef long long ll;

ll Bruno(int N, int A[]){
  ll ans = 0;

  for(int i = 0, j = 0; i < N; i += 2){
    if(A[i] == 0) continue;
    ans |= (((ll) A[i + 1]) << j); j++;
  }

  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 28 ms 2516 KB Output is partially correct - L* = 15
2 Partially correct 35 ms 2432 KB Output is partially correct - L* = 15
3 Partially correct 40 ms 2528 KB Output is partially correct - L* = 16
4 Partially correct 30 ms 2508 KB Output is partially correct - L* = 15
5 Partially correct 28 ms 2376 KB Output is partially correct - L* = 15
6 Partially correct 37 ms 2492 KB Output is partially correct - L* = 15
7 Partially correct 32 ms 2456 KB Output is partially correct - L* = 15
8 Partially correct 40 ms 2428 KB Output is partially correct - L* = 15
9 Partially correct 28 ms 2528 KB Output is partially correct - L* = 16
10 Partially correct 33 ms 2596 KB Output is partially correct - L* = 16
11 Partially correct 36 ms 2444 KB Output is partially correct - L* = 15
12 Partially correct 30 ms 2336 KB Output is partially correct - L* = 16
13 Partially correct 40 ms 2368 KB Output is partially correct - L* = 15
14 Partially correct 31 ms 2432 KB Output is partially correct - L* = 15
15 Partially correct 30 ms 2448 KB Output is partially correct - L* = 15
16 Partially correct 38 ms 2400 KB Output is partially correct - L* = 15
17 Partially correct 31 ms 2460 KB Output is partially correct - L* = 15
18 Partially correct 31 ms 2584 KB Output is partially correct - L* = 15
19 Partially correct 30 ms 2432 KB Output is partially correct - L* = 16
20 Partially correct 28 ms 2568 KB Output is partially correct - L* = 15
21 Partially correct 36 ms 2428 KB Output is partially correct - L* = 15
22 Partially correct 36 ms 2352 KB Output is partially correct - L* = 15
23 Partially correct 30 ms 2428 KB Output is partially correct - L* = 15
24 Partially correct 28 ms 2532 KB Output is partially correct - L* = 15
25 Partially correct 33 ms 2380 KB Output is partially correct - L* = 15
26 Partially correct 34 ms 2412 KB Output is partially correct - L* = 15
27 Partially correct 28 ms 2460 KB Output is partially correct - L* = 15
28 Partially correct 33 ms 2404 KB Output is partially correct - L* = 15
29 Partially correct 34 ms 2392 KB Output is partially correct - L* = 15
30 Partially correct 28 ms 2380 KB Output is partially correct - L* = 15
31 Partially correct 28 ms 2448 KB Output is partially correct - L* = 15
32 Partially correct 33 ms 2440 KB Output is partially correct - L* = 16
33 Partially correct 35 ms 2420 KB Output is partially correct - L* = 15
34 Partially correct 36 ms 2504 KB Output is partially correct - L* = 15
35 Partially correct 32 ms 2324 KB Output is partially correct - L* = 15
36 Partially correct 30 ms 2448 KB Output is partially correct - L* = 15
37 Partially correct 36 ms 2464 KB Output is partially correct - L* = 16
38 Partially correct 32 ms 2412 KB Output is partially correct - L* = 15
39 Partially correct 32 ms 2456 KB Output is partially correct - L* = 15
40 Partially correct 30 ms 2552 KB Output is partially correct - L* = 15