(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.

제출 #587700

#제출 시각아이디문제언어결과실행 시간메모리
587700MilosMilutinovicHop (COCI21_hop)C++14
110 / 110
38 ms1344 KiB
/** * 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...