题目描述:有n个点,有m条路经(双向路径)(起始位置到终止位置耗时为正),有w个虫洞(单向路径)(起始位置到终止位置耗时为负,相当于穿越),判断一个人从起始位置出发,通过虫洞回到起始位置时是否能见到自己(判断是否存在负权环)。
Description
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms comprises N (1 ≤ N ≤ 500) fields conveniently numbered 1..N, M (1 ≤ M ≤ 2500) paths, and W (1 ≤ W ≤ 200) wormholes.
As FJ is an avid time-traveling fan, he wants to do the following: start at some field, travel through some paths and wormholes, and return to the starting field a time before his initial departure. Perhaps he will be able to meet himself :) .
To help FJ find out whether this is possible o