This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/**
* author: wxhtzdy
* created: 02.07.2022 10:48:58
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<long long> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> b(n);
for (int i = 0; i < n; i++) {
while (a[i] > 0) {
b[i] += 1;
a[i] >>= 1;
}
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (b[i] / 4 == b[j] / 4) {
cout << 1 << " ";
} else {
if (b[i] / 16 == b[j] / 16) {
cout << 2 << " ";
} else {
cout << 3 << " ";
}
}
}
cout << '\n';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |