Please read the new rule regarding the restriction on the use of AI tools. ×

learner_cf's blog

By learner_cf, 9 years ago, In English

Read full story here Your text to link here...

You given a undirected weighted graph. You have to select non overlapping edges(No two edges share same vertices) such that weight of selected edges is maximised.

Number of vertices < 200.

Input 7 9 (vertices, edges) 1 2 1 (from, to, weight) 1 4 1 1 6 1 3 2 3 3 4 9 3 6 1 5 2 3 5 4 3 5 6 1

Output 13 by taking edges (1-6) 1 + (3-4) 9 + (5-2) 3 = 13

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?