ICPC2018南昌网络赛——Made In Heaven(天堂制造)(Kth 短路)

One day in the jail, F·F invites Jolyne Kujo (JOJO in brief) to play tennis with her. However, Pucci the father somehow knows it and wants to stop her. There are N spots in the jail and  M roads connecting some of the spots. JOJO finds that Pucci knows the route of the former  (K-1)-th shortest path. If Pucci spots JOJO in one of these K-1 routes, Pucci will use his stand Whitesnake and put the disk into JOJO’s body, which means JOJO won’t be able to make it to the destination. So, JOJO needs to take the  K-th quickest path to get to the destination. What’s more, JOJO only has T units of time, so she needs to hurry.
JOJO starts from spot S, and the destination is numbered E. It is possible that JOJO’s path contains any spot more than one time. Please tell JOJO whether she can make arrive at the destination using no more than T units of time.

有一天,在监狱里,FF邀请JOJO(不是JO厨不知道人名..)和她一块打网球。但是Pucci不知道怎么着的就知道了这件事并且想阻止她。在监狱里有N个地点和M条路连接这些地点。JOJO发现Pucci知道第K-1短路,如果Pucci发现JOJO在K-1短路里的一条的话,Pucci就会用他的站立白蛇并且在JOJO身体里放入磁盘,这意味着JOJO没法到达目的地。所以JOJO需要去走第K短路到达目的地。而且,JOJO只有T单位的时间,所以她得快点。JOJO从S出发,目的地是E。JOJO的路线可能不止一次走过某一个点。请告诉JOJO是否他可以在不超过T单位时间内到达目的地。

输入

There are at most 50 test cases.

至多50组数据
The first line contains two integers N and M (1≤N≤1000,0≤M≤10000). Stations are numbered from 1 to N.

第一行包含两个整数N和M。站点由1至N标号。
The second line contains four numbers S, E, Kand T( 1≤S,E≤N,S≠E,1≤K≤10000,

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值