# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
691249 | tengiz05 | Broken Device (JOI17_broken_device) | C++17 | 48 ms | 2400 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"
using i64 = long long;
void Anna(int n, i64 X, int K, int P[] ){
bool bad[n] {};
for (int i = 0; i < K; i++) {
bad[P[i]] = true;
}
int cur = 0;
for (int i = 0; i < n; i += 2) {
if (!bad[i] && !bad[i + 1]) {
Set(i, 1);
Set(i + 1, X >> cur & 1);
cur++;
} else {
Set(i, 0);
Set(i + 1, 0);
}
}
}
#include "Brunolib.h"
#include <iostream>
using i64 = long long;
long long Bruno( int n, int A[] ){
i64 res = 0;
int cur = 0;
for (int i = 0; i < n; i += 2) {
if (A[i]) {
res |= (1LL << cur) * A[i + 1];
cur++;
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |