HDU-4568 Hunter (Dijkstra&&状压DP)

这篇博客讲述了如何使用Dijkstra算法和状态压缩动态规划(状压DP)解决HDU 4568 Hunter问题,该问题与TSP旅行商问题相关。作者首先尝试了hdu-4571,然后意识到需要处理任意两点间的最短路径。由于本题中必经点较少,作者采用状态压缩来存储已通过的点,增加了虚拟起止节点以简化问题,但在实现过程中出现错误,导致了长时间的调试。
摘要由CSDN通过智能技术生成


Hunter

http://acm.hdu.edu.cn/showproblem.php?pid=4568

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)


Problem Description
  One day, a hunter named James went to a mysterious area to find the treasures. James wanted to research the area and brought all treasures that he could.
  The area can be represented as a N*M rectangle. Any points of the rectangle is a number means the cost of research it,-1 means James can't cross it, James can start at any place out of the rectangle, and explore point next by next. He will move in the rectangle and bring out all treasures he can take. Of course, he will end at any border to go out of rectangle(James will research every point at anytime he cross because he can't remember whether the point are researched or not).
  Now
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值