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

std::vector<std::vector<int>> solve(int n) {
    vector<int>p(3);
    iota(p.begin(), p.end(), 0);
    vector<int>mx = p;
    for (int e = 3; e < n; e++) {
        vector<int>prmx = mx;
        for (int j = 0; j < 3; j++) {
            vector<int>cur = prmx;
            cur[j] = e;
            Triangle v1(cur[0], cur[1], cur[2]);
            Triangle v2(mx[0], mx[1], mx[2]);
            vector<Triangle>e1 = {v1};
            vector<Triangle>e2 = {v2};
            if (compare(e1, e2) >= 0) {
                mx = cur;
            }
        }
    }
    return {mx};
}
