Submission #281802

#TimeUsernameProblemLanguageResultExecution timeMemory
281802Daniel123Wiring (IOI17_wiring)C++17
13 / 100
35 ms3832 KiB
//Subtask 2 #include <vector> #include <algorithm> using namespace std; const int infty = 1e9 + 10; long long min_total_length(vector<int> r, vector<int> b) { int n = r.size(); int m = b.size(); long long ans = 0; for (int i = 0; i < n; i++) { ans += b[0] - r[i]; } for (int j = 0; j < m; j++) { ans += b[j] - r[n - 1]; } ans -= ((long long)min(n, m)) * (b[0] - r[n - 1]); 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...