제출 #1053923

#제출 시각아이디문제언어결과실행 시간메모리
1053923aaaaaarroz전선 연결 (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...