# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
207609 | autumn_eel | Broken Device (JOI17_broken_device) | C++14 | 54 ms | 3568 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
bool b[160],d[160];
void Anna(int N,ll X,int K,int P[]){
memset(b,0,sizeof(b));
memset(d,0,sizeof(d));
rep(i,K){
b[P[i]]=1;
}
for(int i=0;i<N;i+=2){
if(!b[i]&&!b[i+1]){
int e=X%3;
if(e==0)d[i]=0,d[i+1]=1;
if(e==1)d[i]=1,d[i+1]=0;
if(e==2)d[i]=1,d[i+1]=1;
X/=3;
}
}
rep(i,N)Set(i,d[i]);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
ll Bruno(int N,int A[]){
ll ans=0;
for(int i=N-2;i>=0;i-=2){
if(A[i]||A[i+1]){
ans*=3;
ans+=A[i]*2+A[i+1]-1;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |