# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1074723 | thinknoexit | Broken Device (JOI17_broken_device) | C++17 | 27 ms | 3360 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;
using ll = long long;
namespace {
int n;
bool ch[155];
}
void Anna(int N, ll x, int K, int P[]) {
n = N;
for (int i = 0;i < n;i++) ch[i] = 1;
for (int i = 0;i < K;i++) ch[P[i]] = 0;
ll now = 59;
for (int i = 0;i < n;i++) {
if (now == -1) {
Set(i, 0);
continue;
}
if (ch[i] && ch[i + 1]) {
Set(i, 1);
Set(i + 1, (x >> (now--)) & 1ll);
i++;
}
else Set(i, 0);
}
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
ll Bruno(int N, int A[]) {
ll res = 0;
n = N;
for (int i = 0;i < n;i++) {
if (A[i] == 1) {
res = (res << 1ll) | A[i + 1];
i++;
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |