| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1325963 | somefolk | 축제 (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
struct El {
int p, t, idx;
};
vector<int> max_coupons(int a, vector<int> p, vector<int> t){
int n = (int)p.size();
vector<El> el(n);
for(int i = 0; i < n; i++) el[i] = {p[i], t[i], i};
sort(el.begin(), el.end(), [&](auto l, auto r){
return l.p < r.p;
});
vector<int> sol;
for(auto &i : el){
if(a - i.p < 0) break;
sol.push_back(i.idx);
}
return sol;
}
