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