# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
231940 | 2020-05-15T11:34:32 Z | dvdg6566 | Broken Device (JOI17_broken_device) | C++14 | 0 ms | 0 KB |
#include "Annalib.h" #include<iostream> using namespace std; int R[150]; int B[150]; typedef long long ll; void Anna( int N, long long X, int K, int P[] ){ assert(N==150); for(int i=0;i<K;++i){ B[P[i]]=1; } ll a=0; for(int i=0;i<N/2;++i){ if(B[i]||B[i+N/2])continue; R[i]=1; R[i+N/2]=(X&(1LL<<a))>0; ++a; if(a>62)break; } for( int i = 0; i < N; i++ ){ // cout<<R[i]; Set( i, R[i] ); } }