Ingress (TSP问题+floy预处理)

该问题描述了一个玩家在手机游戏Ingress中,从家出发到各个点收集XM资源并返回的问题,受到次数和距离限制。给定n个点、m条道路、每个点的XM获取规则及限制条件,求最大可获取的XM总量。解决方案涉及TSP(旅行商问题)和Floyd预处理的动态规划应用。
摘要由CSDN通过智能技术生成

Ingress

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 102400/65535 K (Java/Others)
Total Submission(s): 440    Accepted Submission(s): 205


 

Problem Description

Brickgao, who profited from your accurate calculating last year, made a great deal of money by moving bricks. Now he became ``gay shy fool'' again and recently he bought an iphone and was deeply addicted into a cellphone game called Ingress. Now he is faced with a problem so he turns to you for help again. We make some slight modifications based on the original rules, so please draw attention to the details below.

There are  portals (indexed from 1 to ) around Brickgao's home, and he can get some substances called XM by hacking the portals. It's known that for each portal , he can get  XM during the first hack, and after each hack, the amount of XM he will get during the next hack will decrease by . If the amount of XM he can get is less than or equal to zero, Brickgao can't get XM from that portal anymore. For the -th portal, if  and he hacks 3 times, he will get 10, 8, 6 XM during each hack.

There are  bidirectional roads between some pairs of portals and between Brickgao's home and some portals. Now he is eager to start his Ingress journey from home and finally return home, but due to the extremely hot w

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值