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<bits/stdc++.h>
#include "wiring.h"
using namespace std;
using ll = long long int;
long long int min_total_length(vector<int> r,vector<int> b){
long long int Count=0;
for(ll i:b) Count+=i;
for(ll i:r) Count-=i;
if((ll)r.size()>(ll)b.size()) Count+=b[0]*((ll)r.size()-(ll)b.size());
else Count+=r.back()*((ll)r.size()-(ll)b.size());
return Count;
}
# | 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... |