| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1362361 | vidux | 휴가 (IOI14_holiday) | C++17 | 9 ms | 1724 KiB |
#include"holiday.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long int findMaxAttraction(int n, int start, int d, int a[]) {
ll ans = 0, cur = 0;
priority_queue<ll, vector<ll>, greater<ll>> pq;
for (int i = 0; i < n; i++) {
pq.push(a[i]);
cur += a[i];
d--;
while (d < 0 && pq.size()) {
ll v = pq.top(); pq.pop();
cur -= v;
d++;
}
if (d >= 0) ans = max(ans, cur);
d--;
}
return ans;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
