백준 2109 C++ https://www.acmicpc.net/problem/2109이건 별로 어려움 없이 풀었다. #include using namespace std;typedef long long ll;int n; //강연 요청을 한 대학 횟수int maxDay = 0;ll result;//int d; //d일안에 강의해라//int p; //강연료vector> lecs; //day, pay순vector days;priority_queue> pq;priority_queue paypq;int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; int d, p; for (int i = 0; i > p >> d; if (d > maxDay).. 2024. 6. 23. 이전 1 다음