cf/mirror

Optimizations From Chelsu

CF
1916G3500· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
2
1 2 1000000000000
4
3 2 6
2 1 10
2 4 6
8
1 2 12
2 3 9
3 4 9
4 5 6
5 6 12
6 7 4
7 8 9
12
1 2 12
2 3 12
2 4 6
2 5 9
5 6 6
1 7 4
4 8 12
8 9 4
8 10 12
2 11 9
7 12 9
Output
1000000000000
12
18
24
1916G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…