{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"给定一个 $n(n\\le 1000)$ 个点,$m(m\\le 10^5)$ 条边的有向图,指定一个点 $x$,求每个点 $i\\to x + x\\to i$ 的最短路之中的最大值是多少。"}},{"title":"Input","value":{"format":"MD","content":"第一行 $n,m,x$。\n\n接下来 $m$ 行,每行 $u,v,w$,表示 $u\\to v$ 有一条权值为 $w$ 的有向边。"}},{"title":"Output","value":{"format":"MD","content":"一行一个答案。"}},{"title":"Sample","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\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\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"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."}}]}