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 dp[201][201];
long long min_total_length(std::vector<int> r, std::vector<int> b) {
long long ans=0;
for(auto i:b)
ans+=i;
for(auto i:r)
ans-=i;
if(r.size()<b.size())
ans+=(long long)(b.size()-r.size()) *(-r.back());
else ans+=(long long)(b.size()-r.size())*(-b[0]);
return ans;
}
# | 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... |