| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1282713 | gabrielz | Festival (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include "festival.h"
std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) {
std::vector<int> R;
std::sort(P.begin(), P.end());
for (auto price : P) {
if (A >= price) {
A -= price;
R.push_back(price);
} else {
break;
}
}
return R;
}
