Language: C++

#include <bits/stdc++.h>

using namespace std;

#define loop(i, n) for(int i = 0;i < int(n);i++)
#define rloop(i, n) for(int i = int(n);i >= 0;i--)
#define range(i, a, b) for(int i = int(a);i <= int(b);i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1, v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1, v2, v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1, v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1, v2, v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define endl '\n'

typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
typedef long long ll;
typedef pair<int, int> pii;

int get(int num) {
    int ret = -1;
    loop(i, 100) {
        if ((1 << i) >= num)return ret;
        ret = i;
    }
}

int main() {

#ifndef ONLINE_JUDGE
    //freopen("in.in", "r", stdin);
    //freopen("out.in", "w", stdout);
#endif
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    vector<pair<pii, int> > edges;
    int st = 1;
    rloop(i, 19) {
        if (i == 1)break;
        edges.pb({{i, i + 1},
                  st});

        edges.pb({{i, i + 1},
                  0});

        st <<= 1;
    }

    int l, sum = 0;
    cin >> l;
    l--;
    int base = 0;
    while (base <= l) {
        int st = 1, cur = -1, sum = 0;
        for (int i = 20; i >= 2; i--) {
            cur = i;
            sum += st;
            if (base + sum > l) {
                break;
            }
            st <<= 1;
        }
        edges.push_back({{1, cur}, base});
        base += st;
    }
    cout << 20 << " " << SZ(edges) << endl;
    for (auto edge : edges)cout << edge.fr.fr << " " << edge.fr.sc << " " << edge.sc << endl;

    return 0;
}#include <bits/stdc++.h>

using namespace std;

#define loop(i, n) for(int i = 0;i < int(n);i++)
#define rloop(i, n) for(int i = int(n);i >= 0;i--)
#define range(i, a, b) for(int i = int(a);i <= int(b);i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1, v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1, v2, v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1, v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1, v2, v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define endl '\n'

typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
typedef long long ll;
typedef pair<int, int> pii;

int get(int num) {
    int ret = -1;
    loop(i, 100) {
        if ((1 << i) >= num)return ret;
        ret = i;
    }
}

int main() {

#ifndef ONLINE_JUDGE
    //freopen("in.in", "r", stdin);
    //freopen("out.in", "w", stdout);
#endif
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    vector<pair<pii, int> > edges;
    int st = 1;
    rloop(i, 19) {
        if (i == 1)break;
        edges.pb({{i, i + 1},
                  st});

        edges.pb({{i, i + 1},
                  0});

        st <<= 1;
    }

    int l, sum = 0;
    cin >> l;
    l--;
    int base = 0;
    while (base <= l) {
        int st = 1, cur = -1, sum = 0;
        for (int i = 20; i >= 2; i--) {
            cur = i;
            sum += st;
            if (base + sum > l) {
                break;
            }
            st <<= 1;
        }
        edges.push_back({{1, cur}, base});
        base += st;
    }
    cout << 20 << " " << SZ(edges) << endl;
    for (auto edge : edges)cout << edge.fr.fr << " " << edge.fr.sc << " " << edge.sc << endl;

    return 0;
}

Compiler output:
a.cc:81:2: error: stray '#' in program
   81 | }#include <bits/stdc++.h>
      |  ^
a.cc:81:3: error: 'include' does not name a type
   81 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:109:5: error: redefinition of 'int get(int)'
  109 | int get(int num) {
      |     ^~~
a.cc:29:5: note: 'int get(int)' previously defined here
   29 | int get(int num) {
      |     ^~~
a.cc:117:5: error: redefinition of 'int main()'
  117 | int main() {
      |     ^~~~
a.cc:37:5: note: 'int main()' previously defined here
   37 | int main() {
      |     ^~~~
a.cc: In function 'int get(int)':
a.cc:35:1: warning: control reaches end of non-void function [-Wreturn-type]
   35 | }
      | ^
a.cc: In function 'int get(int)':
a.cc:115:1: warning: control reaches end of non-void function [-Wreturn-type]
  115 | }
      | ^