Submission #52755

#TimeUsernameProblemLanguageResultExecution timeMemory
52755KieranHorganWiring (IOI17_wiring)C++17
0 / 100
58 ms3156 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; long long min_total_length(vector<int> r, vector<int> 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...