# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
136651 | StevenH | Wiring (IOI17_wiring) | C++14 | 37 ms | 1912 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 <iostream>
using namespace std;
long long min_total_length(std::vector<int> r, std::vector<int> b) {
long long ans=0;
for(int i=0;i<r.size();i++)
{
ans+=b[0]-r[i];
}
for(int i=0;i<b.size();i++)
{
ans+=b[i]-r[r.size()-1];
}
int res=min(r.size(),b.size());
for(int i=0;i<res;i++)
{
ans-=b[0]-r[r.size()-1];
}
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... |