#include <iostream>
#include <vector>
#include <cstdint>
#include "triangles.h"

std::vector<std::vector<int>> solve(int n) {
    std::vector<Triangle> ll = {Triangle(0, 1, 2), Triangle(0, 2, 3)};
    std::vector<Triangle> rr = {Triangle(0, 1, 2), Triangle(1, 2, 3)};
    int compare_result = compare(ll, rr);
    if (compare_result == 0) {
        std::vector<vector<int>> ans(2);
        ans[0] = {0, 1, 2};
        ans[1] = {0, 2, 3};
        return ans;
    }
    Triangle mx(0, 1, 2);
    for (int i = 0; i < n; ++i) {
        for (int j = i + 1; j < n; ++j) {
            for (int k = j + 1; k < n; ++k) {
                vector<Triangle> ll1 = {mx};
                vector<Triangle> rr1 = {Triangle(i, j, k)};
                // cout << i << " " << j << " " << k << " " << compare(ll1, rr1) << "!!!\n";
                if (compare(ll1, rr1) == -1) {
                    mx = Triangle(i, j, k);
                }
            }
        }
    }
    std::vector<vector<int>> ans(1);
    ans[0] = {mx.i, mx.j, mx.k};
    return ans;
}
