题目比较简单,根据图给的方式建边(len->cost)。
唯一需要注意的地方:each number is non-negative and not larger than 1,000,000,000.但是最多是100个点,
路径最长的时候10^9 * (100 - 1)已经超出int范围了。
00446728 | 2010-07-04 19:27:18 | Accepted | 1013 | 171 MS | 304 KB | Visual C++ | Slave_wc |
题目比较简单,根据图给的方式建边(len->cost)。
唯一需要注意的地方:each number is non-negative and not larger than 1,000,000,000.但是最多是100个点,
路径最长的时候10^9 * (100 - 1)已经超出int范围了。
00446728 | 2010-07-04 19:27:18 | Accepted | 1013 | 171 MS | 304 KB | Visual C++ | Slave_wc |