# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
406730 | casperwang | Wiring (IOI17_wiring) | C++14 | 1 ms | 236 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 "wiring.h"
#include <bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define All(x) x.begin(), x.end()
#define pii pair<int,int>
#define ff first
#define ss second
using namespace std;
#define debug(args...) kout("[ " + string(#args) + " ]", args)
void kout() { cerr << endl; }
template <class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ',kout(b...); }
template <class T> void pary(T L, T R) { while (L != R) cerr << *L << " \n"[++L==R]; }
vector<pii> build(vector<int> r, vector<int> b) {
vector<pii> arr;
for (int i : r) arr.pb(i, 0);
for (int i : b) arr.pb(i, 1);
sort(All(arr));
return arr;
}
ll min_total_length(vector<int> r, vector<int> b) {
vector<pii> arr = build(r, b);
vector<ll> dp(arr.size()+1);
int kL, kR;
ll inc;
bool flag = false;
for (int i = 0; i < arr.size(); i++) {
if (flag) {
Compilation message (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... |