Submission #1063173

#TimeUsernameProblemLanguageResultExecution timeMemory
1063173UnforgettableplBroken Device (JOI17_broken_device)C++17
0 / 100
1 ms1048 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...