Submission #1051873

#TimeUsernameProblemLanguageResultExecution timeMemory
1051873UnforgettableplWiring (IOI17_wiring)C++17
13 / 100
28 ms3932 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; long long min_total_length(vector<int> r, vector<int> b) { long long ans = 0; for(int&i:b)ans+=i; for(int&i:r)ans-=i; int tar = max(b.size(),r.size()); for(int i=b.size();i<tar;i++)ans+=b.front(); for(int i=r.size();i<tar;i++)ans-=r.back(); 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...