# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1077208 | thelegendary08 | Broken Device (JOI17_broken_device) | C++14 | 27 ms | 2816 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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, ((1<<(i - (N - 60))) > 0));
}
for(int i = N-61; i>=0; i--)Set(i, 0);
}
else{
for(int i = 0; i<60; i++){
Set(i, ((1<<i) > 0));
}
for(int i = 60; i<N; i++)Set(i, 0);
}
}
#include "Brunolib.h"
long long Bruno( int N, int A[] ){
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){
int ans = 0;
for(int i=N-60; i < N; i++){
ans += A[i] * (1 << (i - N + 60));
}
return ans;
}
else{
int ans = 0;
for(int i = 0; i<60; i++){
ans += A[i] * (1 << i);
}
return ans;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |