# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
903306 | Muhammad_Aneeq | Holiday (IOI14_holiday) | C++17 | 30 ms | 5496 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 <queue>
#include <vector>
#include <set>
#include <iostream>
#include "holiday.h"
using namespace std;
long long findMaxAttraction(int n, int start, int d, int attraction[])
{
long long ans=0;
if (start==0)
{
multiset<int>s;
long long z=0;
for (int j=0;j<min(n,d-1);j++)
{
s.insert(attraction[j]);
z+=attraction[j];
while (j+s.size()>d)
{
z-=*begin(s);
s.erase(begin(s));
}
ans=max(ans,z);
}
return ans;
}
for (int i=0;i<n;i++)
{
}
return 0;
}
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... |