답안 #1063173

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1063173 2024-08-17T14:50:39 Z Unforgettablepl Broken Device (JOI17_broken_device) C++17
0 / 100
1 ms 1048 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

void Anna(int N, long long X, int K, int P[]){
    vector<bool> bad(N);
    for(int i=0;i<K;i++)bad[P[i]]=true;
    int bit = 0;
    for(int i=0;i<N;i++) {
        if(bad[i] or bit==60){Set(i,0);continue;}
        if(X&(1ll<<bit) and bad[i+1]){Set(i,0);continue;}
        Set(i,1);
        Set(i+1,min(1ll,X&(1ll<<bit)));
        i++;bit++;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

long long Bruno(int N, int A[]) {
    int bit = 0;
    long long X = 0;
    for(int i=0;i<N;i++) {
        if(A[i]==0 or bit==60)continue;
        if(A[i+1])X|=(1ll<<bit);
        i++;bit++;
    }
    return X;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 796 KB Wrong Answer [1]
2 Incorrect 0 ms 796 KB Wrong Answer [1]
3 Incorrect 0 ms 796 KB Wrong Answer [1]
4 Incorrect 0 ms 796 KB Wrong Answer [1]
5 Incorrect 0 ms 796 KB Wrong Answer [1]
6 Incorrect 1 ms 800 KB Wrong Answer [1]
7 Incorrect 1 ms 788 KB Wrong Answer [1]
8 Incorrect 1 ms 796 KB Wrong Answer [1]
9 Incorrect 1 ms 796 KB Wrong Answer [1]
10 Incorrect 1 ms 788 KB Wrong Answer [1]
11 Incorrect 0 ms 796 KB Wrong Answer [1]
12 Incorrect 1 ms 788 KB Wrong Answer [1]
13 Incorrect 0 ms 796 KB Wrong Answer [1]
14 Incorrect 1 ms 776 KB Wrong Answer [1]
15 Incorrect 0 ms 796 KB Wrong Answer [1]
16 Incorrect 0 ms 796 KB Wrong Answer [1]
17 Incorrect 0 ms 796 KB Wrong Answer [1]
18 Incorrect 0 ms 796 KB Wrong Answer [1]
19 Incorrect 0 ms 800 KB Wrong Answer [1]
20 Incorrect 0 ms 796 KB Wrong Answer [1]
21 Incorrect 1 ms 780 KB Wrong Answer [1]
22 Incorrect 0 ms 784 KB Wrong Answer [1]
23 Incorrect 0 ms 796 KB Wrong Answer [1]
24 Incorrect 0 ms 796 KB Wrong Answer [1]
25 Incorrect 0 ms 784 KB Wrong Answer [1]
26 Incorrect 0 ms 796 KB Wrong Answer [1]
27 Incorrect 1 ms 792 KB Wrong Answer [1]
28 Incorrect 1 ms 796 KB Wrong Answer [1]
29 Incorrect 1 ms 796 KB Wrong Answer [1]
30 Incorrect 0 ms 792 KB Wrong Answer [1]
31 Incorrect 0 ms 800 KB Wrong Answer [1]
32 Incorrect 0 ms 784 KB Wrong Answer [1]
33 Incorrect 1 ms 792 KB Wrong Answer [1]
34 Incorrect 0 ms 792 KB Wrong Answer [1]
35 Incorrect 0 ms 784 KB Wrong Answer [1]
36 Incorrect 1 ms 1048 KB Wrong Answer [1]
37 Incorrect 0 ms 784 KB Wrong Answer [1]
38 Incorrect 0 ms 796 KB Wrong Answer [1]
39 Incorrect 0 ms 796 KB Wrong Answer [1]
40 Incorrect 1 ms 784 KB Wrong Answer [1]