407592: GYM102835 H Optimization for UltraNet

Memory Limit:1024 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Optimization for UltraNettime limit per test3 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
3 3
1 2 5
1 3 6
2 3 8
Output
20
Input
5 7
1 2 6
1 3 10
1 4 12
2 4 8
2 5 3
3 4 4
4 5 2
Output
44
Input
5 5
2 5 1
1 2 2
2 3 4
1 3 5
2 4 6
Output
24

加入题单

上一题 下一题 算法标签: