# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72873 | SmsS | Wiring (IOI17_wiring) | C++14 | 44 ms | 2156 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>
using namespace std;
#define for2(a,b,c) for(int a=b;a<c;a++)
#define ll long long
#include "wiring.h"
long long min_total_length(std::vector<int> r, std::vector<int> b) {
ll res = 0;
int L = 0;
int R = b.size()-1;
while(L != r.size() && R != -1){
res += b[R]-r[L];
L++;
R--;
}
while(R != -1){
res += b[R]-r[L-1];
R--;
}
while(L != r.size()){
res += b[R+1]-r[L];
L++;
}
return res;
}
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... |