# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
313394 | Kenzo_1114 | Broken Device (JOI17_broken_device) | C++17 | 55 ms | 3072 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "Annalib.h"
using namespace std;
const int MAXN = 160;
bool marc[MAXN];
void Anna(int n, long long x, int k, int p[])
{
for(int i = 0; i < k; i++) marc[p[i]] = true;
marc[n] = true;
int bit = 0;
for(int i = 0; i < n; i++)
{
if(bit >= 60 || marc[i] || marc[i + 1]) Set(i, 0);
else
{
Set(i, 1); i++;
Set(i, (int) ((x & (1LL << bit)) > 0)); bit++;
}
}
}
#include<bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
long long Bruno(int n, int a[])
{
long long x = 0;
int bit = 0;
for(int i = 0; i < n; i++)
if(a[i])
{
x += (long long) a[i + 1] << bit;
i++, bit++;
}
return x;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |