Merging Vertices in a Graph
2141H2700· international gm3s512 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 71 23 22 43 51 45 14 3
Output
1 4
Sample 2of 3
Input
4 31 21 31 4
Output
0 0
Sample 3of 3
Input
200000 0
Output
199999 199999
58%
2141H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…