# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
115492 | KCSC | Fireworks (APIO16_fireworks) | C++14 | 364 ms | 51180 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int DIM = 300005;
struct Dp {
long long a, b;
priority_queue<long long> *points;
};
Dp dp[DIM];
int parent[DIM], length[DIM];
Dp merge(Dp str1, Dp str2) {
Dp ans;
ans.a = str1.a + str2.a;
ans.b = str1.b + str2.b;
if (str1.points -> size() > str2.points -> size()) {
ans.points = str1.points;
while (str2.points -> size()) {
ans.points -> push(str2.points -> top());
str2.points -> pop();
}
} else {
ans.points = str2.points;
while (str1.points -> size()) {
ans.points -> push(str1.points -> top());
# | 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... |