제출 #297087

#제출 시각아이디문제언어결과실행 시간메모리
297087Autoratch전선 연결 (IOI17_wiring)C++14
13 / 100
42 ms3200 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; long long min_total_length(vector<int> r,vector<int> b) { int m = r.size(),n = b.size(); long long ans = 0; for(int i = 0;i < min(m,n);i++) ans+=abs(r[i]-b[i]); for(int i = min(m,n);i < m;i++) ans+=abs(r[i]-b[0]); for(int i = min(m,n);i < n;i++) ans+=abs(b[i]-r.back()); 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...