제출 #425630

#제출 시각아이디문제언어결과실행 시간메모리
425630Rouge_Hugo전선 연결 (IOI17_wiring)C++14
0 / 100
1 ms204 KiB
#include "wiring.h" #include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back using namespace std; vector<ll>r,b;int n,m; ll dp[209][209]; ll go(int x,int y) { ll z=abs(r[x]-b[y]);return z; } long long min_total_length(vector<int> R,vector<int> B) { n=R.size();m=B.size(); for(int i=0;i<m;i++){ b.pb(B[i]); } for(int i=0;i<n;i++){ r.pb(R[i]); } n=R.size();m=B.size(); ll re=0; for(int i=0;i<n-1;i++) { re+=go(i,0); } for(int j=1;j<m;j++) { re+=go(n-1,j); } return re; }
#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...