出處 : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=499
解題策略
使用BellmanFord演算法偵測負環。