# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
718830 | Hacv16 | Broken Device (JOI17_broken_device) | C++17 | 1 ms | 520 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void Anna(int N, ll X, int K, int P[]){
vector<bool> blocked(N + 1);
for(int i = 0; i < K; i++){
int curBit = P[i];
blocked[curBit] = true;
}
int numSame = 1;
vector<int> goodPos;
for(int i = 0; i < N; i++){
if(blocked[i] || (blocked[i + 1])) Set(i, 0);
else goodPos.push_back(i);
}
for(int i = 0, j = 0; i < goodPos.size(); i += 2, j++){
int pos1 = goodPos[i], pos2 = goodPos[i + 1];
int bitOn = (bool)((1 << j) & X);
Set(pos1, 1); Set(pos2, bitOn);
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
typedef long long ll;
ll Bruno(int N, int A[]){
ll ans = 0;
for(int i = 0, j = 0; i < N; i += 2){
if(A[i] == 0) continue;
ans |= (A[i + 1] << j); j++;
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |