(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 #515646

#TimeUsernameProblemLanguageResultExecution timeMemory
515646KoDHop (COCI21_hop)C++17
110 / 110
40 ms1268 KiB
#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<i64> X(N); for (auto& x : X) { std::cin >> x; } int B = 1; while (B * B * B < N) { B += 1; } for (int i = 1; i < N; ++i) { for (int j = 0; j < i; ++j) { int x = j, y = i; int l = 0; while (true) { l += 1; if (x % B < y % B) { std::cout << l; break; } x /= B, y /= B; } std::cout << " \n"[j + 1 == i]; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...