# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1077219 | thelegendary08 | Broken Device (JOI17_broken_device) | C++14 | 28 ms | 2888 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
void Anna( int N, long long X, int K, int P[] ){
if(P[0] <= 60){
for(int i = N - 1; i>=N-60; i--){
Set(i, (((1LL<<(i - (N - 60))) & X) > 0));
}
for(int i = N-61; i>=0; i--)Set(i, 0);
}
else{
for(int i = 0; i<60; i++){
Set(i, (((1LL<<i) & X) > 0));
}
for(int i = 60; i<N; i++)Set(i, 0);
}
}
#include "Brunolib.h"
long long Bruno( int N, int A[] ){
//for(int i = 0; i<N;i++)cout<<A[i]<<' ';
//cout<<'\n';
int f = -1;
for(int i = 0; i<N; i++){
if(A[i] == 1){
f = i;
break;
}
}
if(f == -1)return 0;
else if(f >= 60){
long long ans = 0;
for(int i=N-60; i < N; i++){
ans += A[i] * (1LL << (i - N + 60));
}
//cout<<ans<<'\n';
return ans;
}
else{
long long ans = 0;
for(int i = 0; i<60; i++){
ans += A[i] * (1LL << i);
}
//cout<<ans<<'\n';
return ans;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |