# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
106665 | thebes | Broken Device (JOI17_broken_device) | C++14 | 7 ms | 920 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 <bits/stdc++.h>
using namespace std;
int lol[200], i, j;
void Anna(int N, long long X, int K, int *P){
memset(lol, 0, sizeof(lol));
for(i=0;i<K;i++) lol[P[i]]=1;
j = 60;
for(i=0;i<150;i+=2){
if((1LL<<j)&X){
if(!lol[i]){
Set(i, 1);
Set(i+1, 0);
j--;
}
}
else{
if(!lol[i+1]){
Set(i, 0);
Set(i+1, 1);
j--;
}
}
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno(int N, int *A){
long long ans = 0;
int j = 60;
for(int i=0;i<150;i+=2){
if(A[i]!=A[i+1]){
if(A[i]==1) ans += (1LL<<j);
j--;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |