{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"In the realm of quantum computing, information is transmitted through a complex network of interconnected quantum nodes. Each node possesses the ability to transmit and receive quantum data, and there exist numerous quantum pathways between any pair of nodes. The quantum channel capacity (called bandwidth) represents the maximum amount of quantum information that can be transmitted per unit time.\n\nConsider a quantum network with multiple nodes linked by various quantum channels, each endowed with its unique capacity. For instance, in the diagram below, four nodes are connected by five quantum channels, each labeled with its respective quantum channel capacity.\n\n![4cee0ccad8b06cbb139e8494e62005c4.png](https://imgtr.ee/images/2023/09/07/4cee0ccad8b06cbb139e8494e62005c4.png)\n\nIn this example, the quantum channel capacity between node 1 and node 4 is 25. This is the sum of the capacities: 10 along the path 1-2-4, 10 along the path 1-3-4, and 5 along the path 1-2-3-4. No other combination of paths between nodes 1 and 4 provides a larger quantum channel capacity.\n\nYou are entrusted with the task of creating a program that computes the maximum quantum channel capacity between any two specified nodes in the network, given the individual quantum channel capacities of all the connections.\n\n**Input**\nThe input begins with an integer \u0027n\u0027 (2 ≤ n ≤ 100), representing the number of nodes in the quantum network. The nodes are labeled from 1 to n. The next line contains three numbers \u0027s\u0027, \u0027t\u0027, and \u0027c\u0027. Here, \u0027s\u0027 and \u0027t\u0027 denote the source and destination nodes, and \u0027c\u0027 signifies the total number of quantum connections in the network. Following this are \u0027c\u0027 lines describing the connections. Each line contains three integers: the first two are the labels of the connected nodes, and the third number is the quantum channel capacity. The quantum channel capacity is a non-negative number not exceeding 1000.\n\nThere may be multiple quantum connections between a pair of nodes, but a node cannot be connected to itself. All connections are bi-directional, i.e., quantum data can be transmitted in both directions along a connection, but the sum of the amount of quantum data transmitted in both directions must not exceed the quantum channel capacity.\n\nThe input concludes with a line containing the number \u00270\u0027.\n\n**Output**\nFor each quantum network description, first display the number of the quantum network. Then, exhibit the total quantum channel capacity (bandwidth) between the source node \u0027s\u0027 and the destination node \u0027t\u0027, adhering to the format of the sample output. Include a blank line after each test case."}},{"title":"","value":{"format":"MD","content":"**Sample Input**\n4\n1 4 5\n1 2 20\n1 3 10\n2 3 5\n2 4 10\n3 4 20\n0\n\n**Sample Output**\nNetwork 1\nThe bandwidth is 25."}}]}