# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100014 | cheeheng | Broken Device (JOI17_broken_device) | C++14 | 63 ms | 3072 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 Set( int pos, int bit );
void Anna( int N, long long X, int K, int P[] ){
if(K >= -123){
if(P[0] >= 60){
for(int i = 0; i < 60; i ++){
Set(i, (X&(1LL<<i)) != 0);
}
for(int i = 60; i < 150; i ++){
Set(i, 0);
}
}else if(P[K-1] <= 89){
for(int i = 0; i < 60; i ++){
Set(i + 90, (X&(1LL<<i)) != 0);
}
for(int i = 0; i < 90; i ++){
Set(i, 0);
}
}else{
for(int i = 0; i < 150; i ++){
Set(i, 0);
}
}
}else{
throw;
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno( int N, int A[] ){
long long X1 = 0;
long long X2 = 0;
for(int i = 0; i < 60; i ++){
X1 |= ((long long)A[i]<<i);
}
for(int i = 0; i < 60; i ++){
X2 |= ((long long)A[i+90]<<i);
}
if(X1 == 0 && X2 == 0){
printf("%lld\n", 0);
return 0LL;
}else if(X1 == 0){
printf("%lld\n", X2);
return X2;
}else{
printf("%lld\n", X1);
return X1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |