# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
483672 | CaroLinda | Hop (COCI21_hop) | C++14 | 39 ms | 1308 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 <bits/stdc++.h>
#define mkt make_tuple
#define all(x) x.begin(),x.end()
#define sz(x) (int)(x.size())
#define ll long long
#define lp(i,a,b) for(int i = a ; i < b ; i++ )
#define pii pair<int,int>
#define mk make_pair
#define pb push_back
const int MAX= 1010 ;
const int MAX_PRIMES = 664589 ;
using namespace std ;
int N ;
ll X[MAX];
int getIndex(ll a , ll b )
{
int ak = 63-__builtin_clzll(a) ;
int bk = 63 - __builtin_clzll(b) ;
if((ak/4) == (bk/4)) return 1 ;
if( (ak/16) == (bk/16) ) return 2 ;
return 3 ;
}
int main()
{
scanf("%d", &N );
for(int i = 1 ; i <= N ; i++ ) scanf("%lld", &X[i] ) ;
for(int i = 2 ; i <= N ; i++,printf("\n") )
for(int j = 1 ; j < i ; j++ ) printf("%d " , getIndex(X[j],X[i]) ) ;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |