# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1034672 | adaawf | Broken Device (JOI17_broken_device) | C++17 | 32 ms | 3032 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;
void Anna(int N, long long int X, int K, int P[]) {
set<int> s;
for (int i = 0; i < K; i++) {
s.insert(P[i]);
}
for (int i = 0; i < N; i++) {
if ((X & (1ll << (i % 60))) && !s.count(i)) {
Set(i, 1);
}
else {
Set(i, 0);
}
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
int dd[65];
long long int Bruno(int N, int A[]) {
for (int i = 0; i < 61; i++) dd[i] = 0;
for (int i = 0; i < N; i++) {
if (A[i] == 1) {
dd[i % 60] = 1;
}
}
long long int res = 0;
for (int i = 0; i < 60; i++) {
if (dd[i] == 1) {
res += (1ll << i);
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |