{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"给出n个点和m条边,接着是m条边,代表从牛a到牛b需要花费c时间,现在所有牛要到牛x那里去参加聚会,并且所有牛参加聚会后还要回来,给你牛x,除了牛x之外的牛,他们都有一个参加聚会并且回来的最短时间,从这些最短时间里找出一个最大值输出\n"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Line 1: Three space-separated integers, respectively: \n \u003ci\u003eN\u003c/i\u003e, \n \u003ci\u003eM\u003c/i\u003e, and \n \u003ci\u003eX\u003c/i\u003e \n \u003cbr\u003eLines 2..\n \u003ci\u003eM\u003c/i\u003e+1: Line \n \u003ci\u003ei\u003c/i\u003e+1 describes road \n \u003ci\u003ei\u003c/i\u003e with three space-separated integers: \n \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e, \n \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e, and \n \u003ci\u003eT\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e. The described road runs from farm \n \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e to farm \n \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e, requiring \n \u003ci\u003eT\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e time units to traverse.\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Line 1: One integer: the maximum of time any one cow must walk.\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e4 8 2\n1 2 4\n1 3 2\n1 4 7\n2 1 1\n2 3 5\n3 1 2\n3 4 4\n4 2 3\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e10\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Cow 4 proceeds directly to the party (3 units) and returns via farms 1 and 3 (7 units), for a total of 10 time units.\n \u003c/div\u003e"}}]}