2

Need help in a classic graph problem

 1 year ago
source link: https://codeforces.com/blog/entry/110673
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hello everyone,

I have some trouble with a problem and I hope someone may help me to solve it:

Given a graph N vertices and M edges (N <= 50, M <= N * (N — 1) / 2). Each edge has a weight w (w <= 1e4). And the task is to find if there is a path with the total weight exactly equals to S (S <= 1e18).

Thanks in advance!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK