# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
33917 | imeimi2000 | 전선 연결 (IOI17_wiring) | C++14 | 53 ms | 10144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "wiring.h"
#include <algorithm>
using namespace std;
typedef long long llong;
const int R = 0, B = 1;
int n, m;
struct point {
int x, k;
bool operator<(const point &p) const {
return x < p.x;
}
};
point ps[200001];
int cnt[200001];
llong sum[200001];
llong dp[200001];
long long min_total_length(std::vector<int> r, std::vector<int> b) {
n = r.size();
m = b.size();
int i = 0, j = 0, p = 0;
while (i < n && j < m) {
if (r[i] < b[j]) ps[++p] = { r[i++], R };
else ps[++p] = { b[j++], B };
}
while (i < n) ps[++p] = { r[i++], R };
while (j < m) ps[++p] = { b[j++], B };
llong ret = 0ll;
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |