# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1272304 | nhq0914 | Turnir (COCI17_turnir) | C++17 | 388 ms | 10732 KiB |
#include <bits/stdc++.h>
using namespace std;
int n;
vector <int> a, b;
int main(){
ios::sync_with_stdio(false); cin.tie(nullptr);
cin >> n;
a.resize(1 << n);
for(int i = 0; i < (1 << n); ++i) cin >> a[i];
b = a;
sort(a.begin(), a.end());
for(int i = 0; i < (1 << n); ++i){
cout << n - __lg(upper_bound(a.begin(), a.end(), b[i]) - a.begin()) << ' ';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |