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

mt19937 rnd(time(0));

vector<vector<int> > solve(int n) {
    set<int> vec;
    int k = 0;
    while ((int) vec.size() != 3) {
        int x = rnd() % n;
        int y = rnd() % n;
        if (x == y) {
            continue;
        }
        int p = -1;
        for (int i = 0; i < n; ++i) {
            if (i == x || i == y) {
                continue;
            }
            if (p == -1) {
                p = i;
            } else {
                std::vector<Triangle> left = {Triangle(x, y, p)};
                std::vector<Triangle> right = {Triangle(x, y, i)};
                int c = compare(left, right);
                ++k;
                if (k == 2e6) {
                    exit(-1);
                }
                if (c == -1) {
                    p = i;
                }
            }
        }
        vec.insert(p);
    }
    std::vector<std::vector<int> > ans;
    vector<int> vec1;
    for (auto it: vec) {
        vec1.emplace_back(it);
    }
    ans.emplace_back(vec1);
    return ans;
}
