# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1168971 | AlgorithmWarrior | Wiring (IOI17_wiring) | C++20 | 15 ms | 1964 KiB |
#include "wiring.h"
#include <bits/stdc++.h>
using namespace std;
long long min_total_length(vector<int>r,vector<int>b) {
long long sum=0;
int n=r.size();
int m=b.size();
int i;
for(i=0;i<n;++i)
sum+=r[n-1]-r[i];
for(i=0;i<m;++i)
sum+=b[i]-b[0];
sum+=1LL*(b[0]-r[n-1])*max(n,m);
return sum;
}
# | 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... |