답안 #954863

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
954863 2024-03-28T18:13:40 Z leo_2727 Broken Device (JOI17_broken_device) C++17
0 / 100
1 ms 804 KB
#include <bits/stdc++.h>
#include <Annalib.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
void Anna( int N, ll X, int K, int P[] ){
    vi ar(N, 0);
    ll curr=0;
    for(int i=0;i<K;i++)    ar[P[i]]=-1;
    int i;
    for(i=0;i+2<N;i++){
        if(ar[i]!=0 && ar[i+1]!=0 && ar[i+2]!=0){
            Set( i, 0 );
            break;
        }
        Set( i, 1 );
        ll b1=X & ((ll)1<<curr);
        curr++;
        ll b2=X & ((ll)1<<curr);
        curr++;
        (b1>0)  ?   Set( i+1, 1 )    :   Set( 1+1, 0 );
        (b2>0)  ?   Set( i+2, 1 )    :   Set( 1+2, 0 );
        i+=2;
        if(curr>62) break;
    }
    for(;i<N;i++)   Set( i, 0 );
}
#include <bits/stdc++.h>
#include <Brunolib.h>
typedef long long ll;
using namespace std;
 
ll Bruno(int N, int A[]){
    ll ans=0, curr=0;
    bool br=false;
    for(int i=0;i<N;i++){
        if(i==1){
            i+=2;
            if(A[i+1]==1)   ans|=((ll)1<<curr);
            curr++;
            if(A[i+2]==1)   ans|=((ll)1<<curr);
            curr++;
            if(curr>62) br=true;
        }
        if(br)  break;
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 784 KB Wrong Answer [2]
2 Incorrect 0 ms 796 KB Wrong Answer [2]
3 Incorrect 0 ms 796 KB Wrong Answer [2]
4 Incorrect 0 ms 796 KB Wrong Answer [2]
5 Incorrect 1 ms 796 KB Wrong Answer [2]
6 Incorrect 0 ms 796 KB Wrong Answer [2]
7 Incorrect 0 ms 796 KB Wrong Answer [2]
8 Incorrect 0 ms 796 KB Wrong Answer [2]
9 Incorrect 0 ms 784 KB Wrong Answer [2]
10 Incorrect 1 ms 796 KB Wrong Answer [2]
11 Incorrect 1 ms 796 KB Wrong Answer [2]
12 Incorrect 1 ms 780 KB Wrong Answer [2]
13 Incorrect 1 ms 792 KB Wrong Answer [2]
14 Incorrect 1 ms 796 KB Wrong Answer [2]
15 Incorrect 0 ms 792 KB Wrong Answer [2]
16 Incorrect 0 ms 780 KB Wrong Answer [2]
17 Incorrect 0 ms 800 KB Wrong Answer [2]
18 Incorrect 1 ms 796 KB Wrong Answer [2]
19 Incorrect 1 ms 804 KB Wrong Answer [2]
20 Incorrect 0 ms 792 KB Wrong Answer [2]
21 Incorrect 0 ms 796 KB Wrong Answer [2]
22 Incorrect 1 ms 796 KB Wrong Answer [2]
23 Incorrect 0 ms 784 KB Wrong Answer [2]
24 Incorrect 0 ms 796 KB Wrong Answer [2]
25 Incorrect 1 ms 792 KB Wrong Answer [2]
26 Incorrect 0 ms 784 KB Wrong Answer [2]
27 Incorrect 0 ms 776 KB Wrong Answer [2]
28 Incorrect 1 ms 780 KB Wrong Answer [2]
29 Incorrect 1 ms 796 KB Wrong Answer [2]
30 Incorrect 0 ms 796 KB Wrong Answer [2]
31 Incorrect 0 ms 784 KB Wrong Answer [2]
32 Incorrect 0 ms 784 KB Wrong Answer [2]
33 Incorrect 0 ms 784 KB Wrong Answer [2]
34 Incorrect 0 ms 796 KB Wrong Answer [2]
35 Incorrect 0 ms 784 KB Wrong Answer [2]
36 Incorrect 0 ms 784 KB Wrong Answer [2]
37 Incorrect 0 ms 796 KB Wrong Answer [2]
38 Incorrect 0 ms 800 KB Wrong Answer [2]
39 Incorrect 0 ms 788 KB Wrong Answer [2]
40 Incorrect 0 ms 796 KB Wrong Answer [2]