I use Cpp version,but out wrong answer,example 5 7 1 2 10 1 5 5 2 3 100 2 4 1000 3 4 100 3 5 100 4 5 10000 but out 10 110 210 5 the right answer is just 5. how can I modification this arithmetic?
I use Cpp version,but out wrong answer,example
5 7
1 2 10
1 5 5
2 3 100
2 4 1000
3 4 100
3 5 100
4 5 10000
but out
10 110 210 5
the right answer is just 5.
how can I modification this arithmetic?