# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
753500 | piOOE | Broken Device (JOI17_broken_device) | C++17 | 41 ms | 2792 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll Y = 439789002196527822LL;
void Anna(int N, long long X, int K, int P[]) {
vector<int> a(N), used(N);
X ^= Y;
for (int i = 0; i < K; ++i) {
used[P[i]] = true;
}
for (int i = 0, b = 0; i < N; ++i) {
if (!used[i] && (X >> b & 1) == (i & 1)) {
a[i] = 1;
b += 1;
}
}
for (int i = 0; i < N; i++) {
Set(i, a[i]);
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll Y = 439789002196527822LL;
long long Bruno(int N, int A[]) {
ll X = 0;
for (int i = 0, b = 0; i < N; ++i) {
if (A[i]) {
X |= (i & 1LL) << b;
b += 1;
}
}
X ^= Y;
return X;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |