# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1097008 | Saul0906 | Broken Device (JOI17_broken_device) | C++14 | 41 ms | 3024 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Annalib.h"
#include <vector>
using namespace std;
void Anna(int N, long long X, int K, int *P){
bool bloqueado[N]{};
for(int i=0; i<K; i++) bloqueado[P[i]]=true;
for(int i = 0; i < N; i+=2){
if(bloqueado[i] || bloqueado[i+1]){
Set(i,0);
Set(i+1,0);
continue;
}
if(X&1) Set(i,1), Set(i+1,1);
else Set(i,1), Set(i+1,0);
X/=2;
}
}
#include "Brunolib.h"
#include <vector>
using namespace std;
long long Bruno( int N, int *A){
long long x=0, c=1;
for(int i=0; i<N; i+=2){
if(!A[i]) continue;
if(A[i+1]) x+=c;
c*=2;
}
return x;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |