摘要:
令res[i][j]表示前i个邮局负责前j个村庄的最小值。res[i][j]=res[i-1][k] + dist(k+1,j), (i<=j<=m,i-1<=k<j);#include<iostream>#include<cstdio>#include<cstring>using namespace std;int pos[301],res[35][301];#define MAX 1234567890int min(int a,int b){ return a < b ? a : b;}int dist(int i,int 阅读全文