#Lutece0283. Resistance
Resistance
Migrated from Lutece 283 Resistance
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
H.L. is preparing a circuit for the next coming physical experiment. His circuit consists of nodes, numbered to , which are connected by wires with certain resistance. H.L is curious about the equivalent resistance between Node and Node .
Input
Multi cases.The first line contains two positive integers and M, the number of nodes and wires in the circuit.
The next lines, each describe a wire connection by three integers which indicates that between Node and Node , there is a wire with resistance of ohm.
Output
he equivalent resistance rounded after the second decimal place.
Samples
2 2
1 2 1
1 2 1
0.50
Note
The data used in this problem is unofficial data prepared by 695375900. So any mistake here does not imply mistake in the offcial judge data.
Resources
POJ Founder Monthly Contest – 2008.03.16, g20