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