Submission #100014

#TimeUsernameProblemLanguageResultExecution timeMemory
100014cheehengBroken Device (JOI17_broken_device)C++14
0 / 100
63 ms3072 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&(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)

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:15:27: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
         printf("%lld\n", 0);
                           ^
#Verdict Execution timeMemoryGrader output
Fetching results...