#include "cycle_graph_gen.h"

int main(int argc, char** argv) {
    registerGen(argc, argv, 1);
	int n = opt<int>("n");
	int m = opt<int>("m");
    int mink = opt<int>("mink");
    int maxk = opt<int>("maxk");

    int mind = opt<int>("mind");
    int maxd = opt<int>("maxd");
    
    int graph_type = opt<int>("type");

    cout << 1 << "\n";

    auto [pr, g] = GenRandom(m, mind, maxd);
    
    vector<pair<int, int>> edge;
    vector<double> graph_pr = {0.5, 0.99, 1};
    if (graph_type == 0) {
        edge = build_graph(pr, g);
    } else if (graph_type == 1) {
        edge = build_graph_dir(pr, g, 0.5);
    } else if (graph_type == 2) {
        edge = build_graph_dir(pr, g, 1, true, rnd.next(0, 1));
    } else if (graph_type == 3) {
        edge = build_graph_priority(pr, g, 1);
    }
    int points_type = rnd.next(0, 3);
    vector<int> points;
    int vert = vertices(edge);
    int k = rnd.next(mink, maxk);
    if (mink <= 2 && rnd.next() < 0.01) {
        k = 2;
    }
    if (points_type == 0) {
        points = gen_points(n, vert);
    } else if (points_type == 1) {
        points = gen_points_greedy(n, vert);
    } else if (points_type == 2) {
        points = gen_points_part_greedy(n, vert, 0.3);
    } else if (points_type == 3) {
        points = gen_points_part_greedy(n, vert, 0.03);
    }
    map_graph(points, edge);
    print(n, k, edge);
    return 0;
}