Submission #1059953

#TimeUsernameProblemLanguageResultExecution timeMemory
1059953fv3Wiring (IOI17_wiring)C++14
13 / 100
18 ms1996 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll min_total_length(vector<int> r, vector<int> b) { const int N = r.size(); const int M = b.size(); ll res = 0; for (int i = 0; i < min(N, M); i++) { res += b[i] - r[N-i-1]; } for (int i = 0; i < N - M; i++) res += b[0] - r[i]; for (int i = N; i < M; i++) res += b[i] - r.back(); return res; }
#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...