andre_joy

导航

2012年9月12日

hdu 4284

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=4284题意:给出一些城市,从1出发,旅游一圈回到1,由于花费可能不够,所以选择一些城市打工,打工之前需要花费d买一个证,工资为c。选中的城市必须去工作一次,而且只能工作一次,问能不能完成旅行mark:先用floyd预处理,记住一定要把断点放在最外层循环!!!状态压缩dp。代码:#include <cstdio>#include <cstring>#include <cstdlib>#include <cmath>#include <iostream& 阅读全文

posted @ 2012-09-12 16:44 andre_joy 阅读(93) 评论(0) 推荐(0) 编辑