# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100044 | tqbfjotld | Broken Device (JOI17_broken_device) | C++14 | 64 ms | 3312 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"
#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... |