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

#TimeUsernameProblemLanguageResultExecution timeMemory
372848sam571128Hop (COCI21_hop)C++17
110 / 110
50 ms8428 KiB
#include <bits/stdc++.h> #define int long long #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; const int N = 1e3+5; int to[N][N]; int getnum(int i, int j){ if(__lg(i)/4==__lg(j)/4){ return 1; }else if(__lg(i)/16==__lg(j)/16){ return 2; }else{ return 3; } } signed main(){ fastio int n; cin >> n; int arr[n]; for(auto &x : arr) cin >> x; for(int i = 0;i < n;i++){ for(int j = 0;j < i;j++){ to[i][j] = getnum(arr[i],arr[j]); } } for(int i = 0;i < n;i++){ for(int j = 0;j < i;j++){ cout << to[i][j] << " "; } cout << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...