# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
67621 | aquablitz11 | Wiring (IOI17_wiring) | C++14 | 69 ms | 14288 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 <bits/stdc++.h>
#include "wiring.h"
using namespace std;
using ll = long long;
ll min_total_length(vector<int> r, vector<int> b)
{
ll ans = 0;
for (int i = 1; i < r.size(); ++i)
ans += i*1ll*(r[i]-r[i-1]);
for (int i = 1; i < b.size(); ++i)
ans += i*1ll*(b[b.size()-(i-1)-1]-b[b.size()-i-1]);
ans += (b[0]-r[r.size()-1])*1ll*max(b.size(), r.size());
return ans;
}
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... |