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

제출 #929111

#제출 시각아이디문제언어결과실행 시간메모리
929111Amirreza_FakhriHop (COCI21_hop)C++17
110 / 110
28 ms1600 KiB
// In the name of the God #include <bits/stdc++.h> #define ll long long #define int long long #define pb push_back #define F first #define S second #define mp make_pair #define pii pair <int, int> #define smin(x, y) (x) = min((x), (y)) #define smax(x, y) (x) = max((x), (y)) #define all(x) (x).begin(), (x).end() using namespace std; const int inf = 1e9+7; const int mod = 998244353; const int maxn = 1e3+5; int n, x[maxn], b[maxn]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for (int i = 0; i < n; i++) { cin >> x[i]; x[i] = 63-__builtin_clzll(x[i]); } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (x[i]/4 == x[j]/4) cout << 1; else if (x[i]/16 == x[j]/16) cout << 2; else cout << 3; cout << ' '; } cout << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...