| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1315915 | ezzzay | 축제 (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include "festival.h"
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ff first
#define ss second
std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) {
vector<pair<int,int>>vc;
vector<int>v;
int N=P.size();
for(int i=0;i<N;i++){
vc.pb({P[i],i});
}
sort(vc.begin(),vc.end());
for(auto p:vc){
if(p.ff<=A){
A-=p.ff;
v.pb(p.ss);
}
}
return v;
}
