| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1326169 | somefolk | Festival (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<int> max_coupons(int a, vector<int> p, vector<int> t){
int n = (int)p.size();
vector<int> idx(n);
for(int i = 0; i < n; i++) idx[i] = i;
sort(idx.begin(), idx.end(), [&](int l, int r){
return 1LL*p[l]*t[l]*(t[r]-1)<1LL*p[r]*t[r]*(t[l]-1);
});
return idx;
}
int32_t main(){
ios_base::sync_with_stdio(false); cin.tie(nullptr);
vector<int> ans = max_coupons(13, {4, 500, 8, 14}, {1, 3, 3, 4});
for(auto &i : ans) cout << i << " ";
return 0;
}
