Submission #1253896

#TimeUsernameProblemLanguageResultExecution timeMemory
1253896chr34축제 (IOI25_festival)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; //#define int long long #define endl "\n" #define dbg(x) cout << #x << " = " << (x) << endl; //const int INF = 1e18; const int MAXN = 1e6 + 10; const int MOD = 1e9 + 7; vector<int> max_coupons(int a, vector<int> p, vector<int> t){ int n = p.size(); vector<pair<int, int>> coupons; for(int i = 0; i < n; ++i){ coupons.emplace_back(p[i], i); } sort(coupons.begin(), coupons.end()); vector<int> ans; for(auto [price, index] : coupons){ if(a >= price){ a -= price; ans.push_back(index); } else break; } return ans; } /*int32_t main(){ ios::sync_with_stdio(false); cin.tie(nullptr); //freopen("input.in", "r", stdin); //freopen("input.out", "w", stdout); /*vector<int> ans = max_coupons(13, {4, 500, 8, 14}, {1, 1, 1, 1}); for(auto x : ans) cout<<x<<endl;*/ return 0; }*/

Compilation message (stderr)

festival.cpp:38:5: error: expected unqualified-id before 'return'
   38 |     return 0;
      |     ^~~~~~
festival.cpp:39:1: error: expected declaration before '}' token
   39 | }*/
      | ^
festival.cpp:39:3: error: expected unqualified-id before '/' token
   39 | }*/
      |   ^