# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1035855 | d4xn | Holiday (IOI14_holiday) | C++17 | 5046 ms | 4240 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;
#define int long long
#define all(x) x.begin(), x.end()
const int N = 1e5;
int n, s, d, a[N];
int findMaxAttraction(signed N, signed S, signed D, signed attraction[]) {
n = N;
s = S;
d = D;
for (int i = 0; i < n; i++) {
a[i] = attraction[i];
}
int ans = 0;
for (int i = 0; i <= s; i++) {
priority_queue<int, vector<int>, greater<int>> pq;
int sum = 0;
int rem = d - (s-i);
if (rem <= 0) break;
vector<int> vt(s-i+1);
for (int j = i; j <= s; j++) {
vt[j-i] = a[j];
# | 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... |