{"trustable":false,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003eCIA headquarter collects data from across the country through its classified network. They have been using optical fibres long before it\u0027s been deployed on any civilian projects. However they are still under a lot pressure recently because the data are growing rapidly. As a result they are considering upgrading the network with new technologies that provide a few times wider bandwidth. In the experiemental stage, they would like to upgrade one segment of their original network in order to see how it performs. And as a CIA intern it\u0027s your responsibility to investigate which segment could actually help increase the total bandwidth the headquarter receives, suppose that all the cities have infinite data to send and the routing algorithm is optimized. As they have prepared the data for you in a few minutes, you are told that they need the result immediately. Well, practically immediately.\u003c/p\u003e \n \u003cp\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003eInput contains multiple test cases. First line of each test case contains three integers n, m and l, they represent the number of cities, the number of relay stations and the number of segments. Cities will be referred to as integers from 1 to n, while relay stations use integers from n+1 to n+m. You can saves assume that n + m \u0026lt;\u003d 100, l \u0026lt;\u003d 1000 (all of them are positive). The headquarter is identified by the integer 0.\u003c/p\u003e \n \u003cp\u003eThe next l lines hold a segment on each line in the form of a b c, where a is the source node and b is the target node, while c is its bandwidth. They are all integers where a and b are valid identifiers (from 0 to n+m). c is positive. For some reason the data links are all directional.\u003c/p\u003e \n \u003cp\u003eThe input is terminated by a test case with n \u003d 0. You can safely assume that your calculation can be housed within 32-bit integers.\u003c/p\u003e \n \u003cp\u003e\u003cb"}},{"title":"Output","value":{"format":"HTML","content":"\u003c/b\u003e\u003c/p\u003e \n \u003cp\u003eFor each test print the segment id\u0027s that meets the criteria. The result is printed in a single line and sorted in ascending order, with a single space as the separator. If none of the segment meets the criteria, just print an empty line. The segment id is 1 based not 0 based.\u003c/p\u003e \n \u003cb"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003c/b\u003e\n \u003cpre\u003e\n2 1 3\n1 3 2\n3 0 1\n2 0 1\n2 1 3\n1 3 1\n2 3 1\n3 0 2\n0 0 0\n\u003c/pre\u003e \n \u003cb"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003c/b\u003e\n \u003cpre\u003e\n2 3\n\u0026amp;lthey here is an invisible empty line\u0026gt;\n\u003c/pre\u003e \n \u003cbr\u003e \n "}},{"title":"Translation","value":{"format":"HTML","content":"有N个城市,M个中转站以及L条有向边(u, v, c),表示可以从u向v传送信息,带宽为c。每个城市都在向CIA总部发送无穷大的信息量,但是目前总部实际接收带宽已经不能满足要求。CIA决定要增大某条边的带宽以增大总部的接收带宽,请找出哪些边带宽的增加能导致总部接收带宽的增加。(1 \u003c\u003d N+M \u003c\u003d 100, 1 \u003c\u003d L \u003c\u003d 1000)"}}]}