제출 #515631

#제출 시각아이디문제언어결과실행 시간메모리
515631KoDHop (COCI21_hop)C++17
110 / 110
41 ms1284 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<int> log2(N);
    for (auto& x : log2) {
        i64 y;
        std::cin >> y;
        while (((i64)1 << x) < y) {
            x += 1;
        }
    }
    for (int i = 1; i < N; ++i) {
        for (int j = 0; j < i; ++j) {
            if (log2[i] / 16 != log2[j] / 16) {
                std::cout << 1;
            } else if (log2[i] / 4 != log2[j] / 4) {
                std::cout << 2;
            } else {
                std::cout << 3;
            }
            std::cout << " \n"[j + 1 == i];
        }
    }
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...