# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70879 | zetapi | Wiring (IOI17_wiring) | C++14 | 50 ms | 14216 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;
#define pb push_back
#define mp make_pair
#define ll long long
#define itr ::iterator
typedef pair<int,int> pii;
const int MAX=1e5;
ll min_total_length(vector<int> r,vector<int> b)
{
ll res=0;
if(r.size()<=b.size())
{
for(int A=0;A<r.size();A++)
res+=b[A]-r[A];
for(int A=r.size();A<b.size();A++)
res+=b[A]-r.back();
return res;
}
else if(b.size()<=r.size())
{
for(int A=0;A<b.size();A++)
res+=b[A]-r[A];
for(int A=b.size();A<r.size();A++)
res+=b[0]-r[A];
}
return res;
}
/*signed main()
{
ios_base::sync_with_stdio(false);
return 0;
}*/
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... |