Submission #1053923

#TimeUsernameProblemLanguageResultExecution timeMemory
1053923aaaaaarrozWiring (IOI17_wiring)C++17
13 / 100
31 ms4184 KiB
#include "wiring.h" #include <bits/stdc++.h> typedef long long ll; using namespace std; ll min_total_length(vector<int> r, vector<int> b) { sort(r.begin(), r.end()); sort(b.begin(), b.end()); while (r.size() > b.size()){ b.push_back(b[0]); } while (r.size() < b.size()){ r.push_back(r[r.size()-1]); } ll sumr=0,sumb=0; for(auto&i : r) sumr += i; for (auto&i : b) sumb += i; return sumb - sumr; }
#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...