摘要: 题意: 两辆车去运一堆货物,货物数量小于等于10,问最少需要几趟能把货物全部运到目的地。 1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 const int Ni = 1<<10; 5 const int INF = 1<<27; 6 int dp[Ni],g[Ni],weg[11]; 7 bool vis[Ni]; 8 int n,c1,c2,s; 9 bool judge(int x)//可以一次用两辆车运走返回true10 {11 int i,j,sum= 阅读全文
posted @ 2012-08-22 21:09 qijinbiao1 阅读(515) 评论(0) 推荐(0) 编辑