# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1269308 | sula2 | 축제 (IOI25_festival) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) {
int N = P.size();
vector<int> ind(N);
iota(all(ind), 0);
sort(all(ind), [&](int i, int j) {
long long x = 1LL*-P[i]*T[i]*T[j] - 1LL*P[j]*T[j];
long long y = 1LL*-P[j]*T[j]*T[i] - 1LL*P[i]*T[i];
return x > y;
});
return ind;
}