How to draw a digraph having the edges as weights from an array entered by the user

I need to draw a digraph having constant weights as edges , but the only issue is that the values are coming from an array I don’t know which one is connected to the other.
Each weight can be used only once.

The list is vi = { 45,28,20,38 } (vector integer)

Source: Windows Questions C++