# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1154602 | hmm789 | Hop (COCI21_hop) | C11 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define INF 1000000000000000000
#define MOD 1000000007
int lg(int x) {
return 63-__builtin_clzll(x);
}
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n;
cin >> n;
int a[n];
for(int i = 0; i < n; i++) cin >> a[i];
for(int i = 1; i < n; i++) {
for(int j = 0; j < i; j++) {
if(lg(a[i])/16 != lg(a[j])/16) cout << 1 << " ";
else if(lg(a[i])/4 != lg(a[j])/4) cout << 2 << " ";
else cout << 3 << " ";
}
cout << endl;
}
}