제출 #52756

#제출 시각아이디문제언어결과실행 시간메모리
52756KieranHorgan전선 연결 (IOI17_wiring)C++17
13 / 100
39 ms12748 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; #define int long long long long min_total_length(vector<signed> r, vector<signed> b) { int ans = 0; reverse(r.begin(), r.end()); for(auto x: r) ans += abs(x-b[0]); for(auto x: b) ans += abs(x-r[0]); ans -= min(r.size(), b.size())*abs(b[0]-r[0]); 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...