#include "festival.h"
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
int n, a;
struct coupon
{
    int cost, type, index;
    coupon(){};
    coupon(int _cost, int _type, int _index)
    {
        cost = _cost;
        type = _type;
        index = _index;
    }
};
bool cmp(coupon c1, coupon c2)
{
    return (c1.cost < c2.cost);
}
vector < coupon > g;
std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) {
    a = A;
    n = P.size();
    vector < coupon > g;
    for (int i = 0; i < n; ++ i)
    {
        g.pb(coupon(P[i], T[i], i));
    }
    vector < int > res;
    for (auto &[c, t, i]: g)
    {
        if(c >= a)
        {
            res.pb(i);
            a -= c;
        }
    }
  return res;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |