# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
217244 | DystoriaX | Holiday (IOI14_holiday) | C++14 | 22 ms | 3204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"holiday.h"
#include <bits/stdc++.h>
using namespace std;
long long int ans, sum = 0;
priority_queue<int, vector<int>, greater<int> > pq;
long long int findMaxAttraction(int n, int start, int d, int attraction[]) {
for(int i = 0; i <= d; i++){
sum += attraction[i];
pq.push(attraction[i]);
while(pq.size() > d - i) sum -= pq.top(), pq.pop();
ans = max(ans, sum);
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |