# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72594 | ikura355 | Broken Device (JOI17_broken_device) | C++14 | 83 ms | 13712 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;
#define ll long long
const int maxn = 150 + 5;
int bad[maxn];
void Anna(int N, long long X, int K, int P[]) {
for(int i=0;i<N;i++) bad[i] = 0;
for(int i=0;i<K;i++) bad[P[i]] = 1;
int pos = 59;
for(int i=0;i<N;i+=2) {
if(bad[i] || bad[i+1] || pos == -1) {
Set(i,0);
Set(i+1,0);
}
else {
// printf("Set %d %d\n",1,(X&(1<<pos))!=0);
Set(i,1);
if(X&(1LL<<pos)) Set(i+1,1);
else Set(i+1,0);
pos--;
}
}
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll Bruno(int N, int A[]) {
ll ans = 0;
for(int i=0;i<N;i+=2) {
if(A[i]==1) ans = ans*2 + A[i+1];
}
// printf("ans = %lld\n",ans);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |