# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
515644 | | KoD | Hop (COCI21_hop) | C++17 | | 38 ms | 1292 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>
using std::vector;
using std::array;
using std::pair;
using std::tuple;
using i64 = std::int64_t;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int N;
std::cin >> N;
vector<int> log2(N);
for (auto& x : log2) {
i64 y;
std::cin >> y;
x = 63 - __builtin_clzll(y);
}
for (int i = 1; i < N; ++i) {
for (int j = 0; j < i; ++j) {
int a = log2[j], b = log2[i];
if (a >= b) {
std::cout << 1;
} else {
int label = 1;
while (a % 4 >= b % 4) {
a /= 4, b /= 4;
label += 1;
}
std::cout << label;
}
std::cout << " \n"[j + 1 == i];
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |