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

#TimeUsernameProblemLanguageResultExecution timeMemory
537588siewjhHop (COCI21_hop)C++17
110 / 110
42 ms1292 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int nums; cin >> nums; vector<ll> vec(nums); for (int i = 0; i < nums; i++) cin >> vec[i]; vector<int> grp(nums); ll prevst = 0; int currgrp = -1; for (int i = 0; i < nums; i++){ if (vec[i] >= prevst * 16) { currgrp++; prevst = vec[i]; } grp[i] = currgrp; } for (int i = 1; i < nums; i++){ for (int j = 0; j < i; j++){ if (grp[j] == grp[i]) cout << 1; else if (grp[i] - grp[j] < 4) cout << 2; else cout << 3; cout << ' '; } cout << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...