제출 #100104

#제출 시각아이디문제언어결과실행 시간메모리
100104cheehengBroken Device (JOI17_broken_device)C++14
8 / 100
69 ms3072 KiB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
 
//void Set( int pos, int bit );
 
void Anna( int N, long long X, int K, int P[] ){
    for(int i = 0; i < 60; i ++){
        if(binary_search(P, P+K, i)){
            Set(i+75, (X&(1LL << i)) != 0);
            Set(i, 0);
        }else{
            Set(i, (X&(1LL << i)) != 0);
            Set(i+75, 0);
        }
    }
    for(int i = 60; i < 75; i ++){
        Set(i, 0);
    }
    for(int i = 135; i < 150; i ++){
          Set(i, 0);
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

long long Bruno( int N, int A[] ){
    long long X = 0;
    for(int i = 0; i < 60; i ++){
        if(A[i] || A[i+75]){
            X |= (1LL<<i);
        }
    }
    //printf("%lld\n", X);
    return X;
}
#Verdict Execution timeMemoryGrader output
Fetching results...