# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068378 | edogawa_something | Wiring (IOI17_wiring) | C++17 | 1 ms | 348 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;
typedef long long ll;
typedef pair<ll,ll> pii;
typedef vector<ll> vii;
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define pb push_back
long long min_total_length(std::vector<int> r, std::vector<int> b) {
long long ans;
for(auto it:r) {
ans-=it;
}
for(auto it:b)
ans+=it;
if(b.size()>r.size())
ans-=r.back()*(b.size()-r.size());
else
ans+=b.front()*(r.size()-b.size());
return ans;
}
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... |