Submission #72849

#TimeUsernameProblemLanguageResultExecution timeMemory
72849mr_bananaWiring (IOI17_wiring)C++17
0 / 100
3 ms468 KiB
#include "wiring.h" #include<bits/stdc++.h> using namespace std; const int MN=200+10; long long dp[MN][MN]; long long min_total_length(std::vector<int> r, std::vector<int> b) { int n=r.size(),m=b.size(); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ dp[i+1][j+1]=abs(r[i]-b[j])+min(dp[i][j],min(dp[i][j+1],dp[i+1][j])); } } return dp[n][m]; }
#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...