# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1045705 | LittleOrange | Wiring (IOI17_wiring) | C++17 | 0 ms | 348 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>
using namespace std;
using ll = long long;
long long min_total_length(std::vector<int> r, std::vector<int> b) {
ll n = r.size(),m = b.size();
ll c = min(c,m);
ll ret = 0;
for(ll i = 0;i<c;i++){
ret += b[i]-r[i+n-c];
}
if (n>m){
for(ll i = 0;i<n-m;i++){
ret += b[0] - r[i];
}
}
if(m>n){
for(ll i = n;i<m;i++){
ret += b[i] - r.back();
}
}
return ret;
}
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... |