Submission #136088

#TimeUsernameProblemLanguageResultExecution timeMemory
136088arthurconmyHoliday (IOI14_holiday)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #ifndef ARTHUR_LOCAL #include "holiday.h" #endif using namespace std; int findMaxAttractions(int n, int sta, int d, int A[]) { int ans=0; priority_queue<int> active; int active_sum=0; for(int i=0; i<n; i++) { active.push(-A[i]); active_sum += A[i]; while(int(active.size()) + i > d && !active.empty()) { active_sum += active.top(); active.pop(); } if(int(active.size()) + i <= d) ans = max(ans,active_sum); } return ans; }

Compilation message (stderr)

/tmp/ccfs2mhR.o: In function `main':
grader.cpp:(.text.startup+0x89): undefined reference to `findMaxAttraction(int, int, int, int*)'
collect2: error: ld returned 1 exit status