(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #712898

#TimeUsernameProblemLanguageResultExecution timeMemory
712898KoDHop (COCI21_hop)C++17
110 / 110
39 ms1296 KiB
#include <array> #include <iostream> #include <vector> int main() { int n; std::cin >> n; std::vector<std::array<int, 3>> a(n); for (int i = 0; i < n; ++i) { long long x; std::cin >> x; int log = 64 - __builtin_clzll(x); for (int k = 0; k < 3; ++k) { a[i][k] = log % 4; log /= 4; } } for (int j = 1; j < n; ++j) { for (int i = 0; i < j; ++i) { int k = 2; while (k > 0 and a[i][k] == a[j][k]) { k -= 1; } std::cout << k + 1 << " \n"[i == j - 1]; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...