Submission #1253066

#TimeUsernameProblemLanguageResultExecution timeMemory
1253066QwertyPiFestival (IOI25_festival)C++20
Compilation error
0 ms0 KiB
#include "festival.h" #include <bits/stdc++.h> #define int long long using namespace std; const int MX = 2e14 + 11; struct coupon { int p, t, id; bool operator< (const coupon& o) const { return p < o.p; } }; vector<coupon> C[5]; vector<int> max_coupons(int A, vector<int> P, vector<int> T) { for (int i = 0; i < P.size(); i++) { C[T[i]].push_back({P[i], T[i], i}); } for (int t = 1; t <= 4; t++) { sort(C[t].begin(), C[t].end()); } vector<int> ans; for (auto c : C[1]) { if (A >= c.p) { A -= c.p; ans.push_back(c.id); } } return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccw4heZf.o: in function `main':
grader.cpp:(.text.startup+0x232): undefined reference to `max_coupons(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status