Spanning Tree Queries
1633E2400· grandmaster4s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 84 1 43 1 03 5 32 5 43 4 84 3 44 2 85 3 93 11 1 1 100 1 2
Output
4
Sample 2of 3
Input
6 72 4 05 4 72 4 02 1 72 6 13 4 41 4 84 10 3 3 73 0 2 1
Output
5
Sample 3of 3
Input
3 31 2 502 3 1001 3 1501 10000000 0 0 10000000075
Output
164
58%
1633E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…