제출 #139470

#제출 시각아이디문제언어결과실행 시간메모리
139470arthurconmy전선 연결 (IOI17_wiring)C++14
13 / 100
38 ms3832 KiB
#include <bits/stdc++.h> #ifndef ARTHUR_LOCAL #include "wiring.h" #endif using namespace std; using ll = long long; ll min_total_length(vector<int> R, vector<int> B) { ll ans = 0; for(auto r:R) ans -= ll(r); for(auto b:B) ans += ll(b); if(B.size() > R.size()) ans -= ll(B.size()-R.size())*ll(R.back()); else ans += ll(R.size()-B.size())*ll(B[0]); return ans; } #ifdef ARTHUR_LOCAL int main() { cout << min_total_length({1,2},{3,4}) << endl; } #endif
#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...