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