#include "triangles.h"
#include<bits/stdc++.h>
using namespace std;

///int compare(const std::vector<Triangle>& left, const std::vector<Triangle>& right);

vector<std::vector<int>> solve(int n)
{
    int ran=rand()%(n-2);
    ran++;
    int best1, best2, best3=ran;
    best1=ran-1;
    best2=ran+1;

    for (long long i=0; i<n; i++)
    {
        for (long long j=i+1; j<n; j++)
        {
            if (i==j) continue;
            if (i==best1 && j==best2) continue;
            if (i==ran || j==ran) continue;

            if (compare({{ran, best1, best2}}, {{ran, i, j}})==-1)
            {
                best1=i;
                best2=j;
            }
        }
    }

    for (long long i=0; i<n; i++)
    {
        if (i==best1 || i==best2) continue;
        if (i==best3) continue;
        
        if (compare({{best1, best2, best3}}, {{best1, best2, i}})==-1)
        {
            best3=i;
        }
    }

    return {{best1, best2, best3}};

}



