제출 #283879

#제출 시각아이디문제언어결과실행 시간메모리
283879mohammad전선 연결 (IOI17_wiring)C++14
13 / 100
40 ms3832 KiB
#include "wiring.h" #include<bits/stdc++.h> using namespace std; #define endl "\n" // #define int long long typedef long long ll ; const ll ooo = 1e14 ; const ll oo = 2e9 ; const double PI = acos(-1) ; const ll M = 1e9 + 7 ; const int N = 10000010 ; ll dp[222][222]; ll min_total_length(vector<int> r, vector<int> b) { ll nr = r.size() , nb = b.size(); ll ans = 0 ; for(int i = 0 ; i < nr ; ++i) ans += r[nr - 1] - r[i]; for(int i = 0 ; i < nb ; ++i) ans += abs(b[0] - b[i]); return ans + max(nr , nb) * abs(b[0] - r[nr - 1]); }
#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...