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

제출 #382428

#제출 시각아이디문제언어결과실행 시간메모리
382428VEGAnnHop (COCI21_hop)C++14
110 / 110
22 ms1536 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1010; int n; ll x[N], mx[N]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); #ifdef _LOCAL freopen("in.txt","r",stdin); #endif // _LOCAL cin >> n; for (int i = 0; i < n; i++) cin >> x[i]; for (int i = 0; i < n; i++){ mx[i] = 0; while ((1ll << (mx[i] + 1)) <= x[i]) mx[i]++; for (int j = 0; j < i; j++){ if (mx[i] / 4 == mx[j] / 4) cout << "1 "; else if (mx[i] / 16 == mx[j] / 16) cout << "2 "; else cout << "3 "; } cout << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...