Submission #52756

#TimeUsernameProblemLanguageResultExecution timeMemory
52756KieranHorganWiring (IOI17_wiring)C++17
13 / 100
39 ms12748 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; #define int long long long long min_total_length(vector<signed> r, vector<signed> b) { int ans = 0; reverse(r.begin(), r.end()); for(auto x: r) ans += abs(x-b[0]); for(auto x: b) ans += abs(x-r[0]); ans -= min(r.size(), b.size())*abs(b[0]-r[0]); 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...