| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1339932 | Desh03 | Festival (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
vector<int> max_coupons(int a, vector<int> p, vector<int> t) {
int n = p.size();
vector<int> id(n);
iota(id.begin(), id.end(), 0);
sort(id.begin(), id.end(), [&](const int &i, const int &j) {
return ((long long) (x - p[i]) * t[i] - p[j]) * t[j] < ((long long) (x - p[j]) * t[j] - p[i]) * t[i];
});
return id;
}
