{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e小s最近学习了空间魔法,他能够在两个空间点处建立空间传送阵进行连接,整个空间包含n个点和m条边,每条边有一定的花费cost,在两个点建立连接的代价是两点间所有路径中最小的路径代价T,定义一条路径的代价T为路径中花费最大的那条边,现在小s想要多次询问你,如果对于一个能量值s,他最多能够对多少对点建立传送阵进行连接呢?(你可以认为每对点的建立都是独立的,也就是说只要能建立的点都可以建立,建立之后不会产生花费)\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e输入包含多组数据,这就意味你的读入要一直到不等于EOF才能停止.\u003c/p\u003e\n\u003cp\u003e每组数据第一行包含三个整数 N, M , Q (1 \u0026lt; N ≤ 10,000, 0 \u0026lt; M ≤ 50,000, 0 \u0026lt; Q ≤ 10,000). 点的数量,边的数量以及询问的数量.\u003c/p\u003e\n\u003cp\u003e 接下来m行,代表边的信息,a ,b,cost (1 ≤ a, b ≤ N, 0 ≤ cost ≤ 10^8)\u003c/p\u003e\n\u003cp\u003e 最后Q行,每行一个整数s,代表小s询问的能量值(0 ≤ s ≤ 10^8).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"Output the answer to each query on a separate line."}},{"title":"Sample","value":{"format":"HTML","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\u003e\u003cpre\u003e10 10 10\n7 2 1\n6 8 3\n4 5 8\n5 8 2\n2 8 9\n6 4 5\n2 1 5\n8 10 5\n7 3 7\n7 8 8\n10\n6\n1\n5\n9\n1\n8\n2\n7\n6\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e36\n13\n1\n13\n36\n1\n36\n2\n16\n13\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}