# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
822956 | Shithila | Wiring (IOI17_wiring) | C++14 | 22 ms | 1864 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;
long long min_total_length(std::vector<int> r, std::vector<int> b) {
int rlen=r.size();
int blen=b.size();
long long x=0;
int y=0;
if(rlen<blen)
{
for(int i=0;i<blen;i++)
{
x+=b[i]-r[rlen-1];
}
for(int i=0;i<rlen-1;i++)
{
x+=r[rlen-1]-r[i];
}
}
else
{
for(int i=0;i<rlen;i++)
{
x+=b[0]-r[i];
}
for(int i=1;i<blen;i++)
{
x+=b[i]-b[0];
}
}
return x;
}
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... |