http://noi.openjudge.cn/english/17/
描述
There are N cities, the length of edges between cities is given. Please find the city with the largest index id satisfying that there exisits a path between city 1 and city id and the length of this path is no more than K.
输入
First line: two positive integers N (N <= 100) and K (K <= 10000).
Next N lines: the i-th line contains N non-negative integers (<= 100) indicating the length of edge between city i and other cities.
输出
One integer id.
附近最大城市
描述:
有N个城市,给定城市之间边的长度,请找到城市与最大指数编号满足那里有在城市1到城市id之间有一条路径,并且此路径的长度不超过K。
输入:
第一行:两个正整数N和K(N <= 100)(K < = 10000)
接下来N行:第i行包含N个非整数(<= 100),指示城市i与其他城市之间边的长度
输出:
一个整数id