제출 #1059953

#제출 시각아이디문제언어결과실행 시간메모리
1059953fv3전선 연결 (IOI17_wiring)C++14
13 / 100
18 ms1996 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll min_total_length(vector<int> r, vector<int> b) { const int N = r.size(); const int M = b.size(); ll res = 0; for (int i = 0; i < min(N, M); i++) { res += b[i] - r[N-i-1]; } for (int i = 0; i < N - M; i++) res += b[0] - r[i]; for (int i = N; i < M; i++) res += b[i] - r.back(); return res; }
#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...