Submission #1282075

#TimeUsernameProblemLanguageResultExecution timeMemory
1282075lukasuliashviliFestival (IOI25_festival)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N; long long S; cin >> N >> S; vector<long long> prices(N); for (int i = 0; i < N; ++i) { int t; cin >> t >> prices[i]; } sort(prices.begin(), prices.end()); int count = 0; for (int i = 0; i < N; ++i) { if (S >= prices[i]) { S -= prices[i]; ++count; } else { break; } } cout << count << endl; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccxIzPZh.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccY74UAV.o:festival.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccxIzPZh.o: in function `main':
grader.cpp:(.text.startup+0x22a): 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