#include <iostream>
#include "Graph.h"

int main()
{
    int v, e;
    std::cout << "Enter number of vertices: ";
    std::cin >> v;
    std::cout << "Enter number of edges: ";
    std::cin >> e;

    //create
    Graph g(v, e);
    
    //solve
    Edge* arr = g.get_accepted_edges();

    //display
    int count = 0;
    std::cout << "Selected edges are:\n";
    for (int j = 0; j < v-1; j++)
    {
        std::cout << j + 1 << ". Edge between " << arr[j].get_v1() << " & " << arr[j].get_v2() << " with weight " << arr[j].get_w() << ".\n";
        count += arr[j].get_w();
    }
    std::cout << "Calculated Cost: " << count;

    return 0;
}