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