이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
constexpr int N = 1e5;
int p[N+9];
std::vector<int> smallest_sums(int n, std::vector<int> a, std::vector<int> b) {
priority_queue<pair<int,int>> ter;
for (int x=0;x<n;x++){
p[x]=0;
ter.push({-(a[x]+b[0]),x});
}
b.push_back(2e9);
vector<int> odp;
for (int x=0;x<n;x++){
pair<int,int> t=ter.top(); ter.pop();
odp.push_back(-t.first);
p[t.second]++;
ter.push({-(a[t.second]+b[p[t.second]]),t.second});
}
return odp;
}
# | 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... |