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>
#define int int64_t
using namespace std;
#include "wiring.h"
constexpr static int MXSIZE = 1e5;
long long min_total_length(vector<int32_t> r, vector<int32_t> b)
{
int m = r.back();
int sum = 0;
for (int i : r)
sum += m - i;
for (int i : b)
sum += i - m;
if (r.size() > b.size())
sum += (b[0] - m) * (r.size() - b.size());
return sum;
}
# | 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... |