Submission #100008

#TimeUsernameProblemLanguageResultExecution timeMemory
100008cheehengBroken Device (JOI17_broken_device)C++14
0 / 100
78 ms3320 KiB
#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&(1<<i)) != 0); } for(int i = 60; i < 150; i ++){ Set(i, 0); } }else{ for(int i = 0; i < 60; i ++){ Set(i + 90, (X&(1<<i)) != 0); } for(int i = 0; i < 90; 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; } }
#Verdict Execution timeMemoryGrader output
Fetching results...