You are viewing a single comment's thread. Return to all comments →
Don't do integer programming people, this task can be solved using simple graph theory in 50 lines of code.
Hint: there exists a graph, in which the given question is equivalent to finding the shortest path from 0 to n.
Seems like cookies are disabled on this browser, please enable them to open this website
Liars
You are viewing a single comment's thread. Return to all comments →
Don't do integer programming people, this task can be solved using simple graph theory in 50 lines of code.
Hint: there exists a graph, in which the given question is equivalent to finding the shortest path from 0 to n.