{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"给定一个下三角矩阵,询问从1开始到其他点的最短路径中,最长的那个是多少"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n The input will describe the topology of a network connecting n processors. The first line of the input will be n, the number of processors, such that 1 \u0026lt;\u003d n \u0026lt;\u003d 100. \n \u003cbr\u003e \n \u003cbr\u003eThe rest of the input defines an adjacency matrix, A. The adjacency matrix is square and of size n x n. Each of its entries will be either an integer or the character x. The value of A(i,j) indicates the expense of sending a message directly from node i to node j. A value of x for A(i,j) indicates that a message cannot be sent directly from node i to node j. \n \u003cbr\u003e \n \u003cbr\u003eNote that for a node to send a message to itself does not require network communication, so A(i,i) \u003d 0 for 1 \u0026lt;\u003d i \u0026lt;\u003d n. Also, you may assume that the network is undirected (messages can go in either direction with equal overhead), so that A(i,j) \u003d A(j,i). Thus only the entries on the (strictly) lower triangular portion of A will be supplied. \n \u003cbr\u003e \n \u003cbr\u003eThe input to your program will be the lower triangular section of A. That is, the second line of input will contain one entry, A(2,1). The next line will contain two entries, A(3,1) and A(3,2), and so on. \n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Your program should output the minimum communication time required to broadcast a message from the first processor to all the other processors. \n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e5\n50\n30 5\n100 20 50\n10 x x 10\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e35\u003c/pre\u003e"}}]}