# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206282 | achibasadzishvili | Wiring (IOI17_wiring) | C++17 | 43 ms | 3872 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>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
ll min_total_length(vector<int>a , vector<int>b){
ll n = (ll)a.size() , m = (ll)b.size();
ll l = b[0] - a[n - 1],sa = 0 , sb = 0;
for(int i=0; i<a.size(); i++)
sa += a[i];
for(int i=0; i<b.size(); i++)
sb += b[i];
return n * a[n - 1] - sa + sb - m * b[0] + max(n , m) * l;
}
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... |