Submission #837208

#TimeUsernameProblemLanguageResultExecution timeMemory
837208JohannWiring (IOI17_wiring)C++14
0 / 100
14 ms3020 KiB
#include "wiring.h" #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() long long min_total_length(std::vector<int> R, std::vector<int> B) { ll ans = 0; for (int i = 0; i < sz(R); ++i) ans += B.front() - R[i]; for (int i = 0; i < sz(B); ++i) ans += B[i] - R.back(); ans -= (B.front() - R.back()) * min(sz(R), sz(B)); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...