제출 #1282713

#제출 시각아이디문제언어결과실행 시간메모리
1282713gabrielz축제 (IOI25_festival)C++20
컴파일 에러
0 ms0 KiB
#include "festival.h" std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) { std::vector<int> R; std::sort(P.begin(), P.end()); for (auto price : P) { if (A >= price) { A -= price; R.push_back(price); } else { break; } } return R; }

컴파일 시 표준 에러 (stderr) 메시지

festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:6:8: error: 'sort' is not a member of 'std'
    6 |   std::sort(P.begin(), P.end());
      |        ^~~~