Language: C++

#include<bits/stdc++.h>
#include <stdlib.h>
#include <stdio.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0));
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0));
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a));
#define Reverse(a) reverse(All(a));
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define print(a) cout << (a) << endl;
#define printD(a) cout << setprecision(10) << ans << endl;
using namespace std;
int max_int = 1000000007;
void Debug(auto a);
int nibul(auto a,auto b);
int nibuu(auto a,auto b);
void input(vector<int>& a,int n);

int n,m;
struct UnionFind {
    vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

    UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
        for(int i = 0; i < N; i++) par[i] = i;
    }

    int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }

    void unite(int x, int y) { // xとyの木を併合
        int rx = root(x); //xの根をrx
        int ry = root(y); //yの根をry
        if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
        par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
    }

    bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
};


signed main(){
    int c;
    int ans=0;
    cin >> n >> c;
    vec(a,100004);
    REP(i,n){  
        int s,t,c;
        cin >> s >> t >> c;
        a[s-1]++;
        a[t]--;
    }
    int tmp=0;
    REP(i,100004){
        tmp += a[i];
        ans = max(ans,tmp);
    }
    print(min(ans,30))


    return 0;
}

void Debug(auto a){
    cout << "{ ";
    for(auto b: a){
        cout << b << " ";
    }
    cout << "}" << endl;
}
int nibul(auto a,auto b){
    int x = lower_bound(All(a),b) - a.begin();
    //key以上の初めてのitr
    return x;
}
int nibuu(auto a,auto b){
    int x = upper_bound(All(a),b) - a.begin();
    //key以下の最後のitr
    return x-1;
}

void input(vector<int>& a,int n){
    REP(i,n){
        cin >> a[i];
    }
}


Compiler output:
a.cc:21:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   21 | void Debug(auto a);
      |            ^~~~
a.cc:22:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   22 | int nibul(auto a,auto b);
      |           ^~~~
a.cc:22:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   22 | int nibul(auto a,auto b);
      |                  ^~~~
a.cc:23:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   23 | int nibuu(auto a,auto b);
      |           ^~~~
a.cc:23:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   23 | int nibuu(auto a,auto b);
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:70:14: error: no matching function for call to 'min(long long int&, int)'
   70 |     print(min(ans,30))
      |           ~~~^~~~~~~~
a.cc:17:27: note: in definition of macro 'print'
   17 | #define print(a) cout << (a) << endl;
      |                           ^
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:70:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   70 |     print(min(ans,30))
      |           ~~~^~~~~~~~
a.cc:17:27: note: in definition of macro 'print'
   17 | #define print(a) cout << (a) << endl;
      |                           ^
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:70:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   70 |     print(min(ans,30))
      |           ~~~^~~~~~~~
a.cc:17:27: note: in definition of macro 'print'
   17 | #define print(a) cout << (a) << endl;
      |                           ^
a.cc: At global scope:
a.cc:76:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   76 | void Debug(auto a){
      |            ^~~~
a.cc:83:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   83 | int nibul(auto a,auto b){
      |           ^~~~
a.cc:83:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   83 | int nibul(auto a,auto b){
      |                  ^~~~
a.cc:88:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   88 | int nibuu(auto a,auto b){
      |           ^~~~
a.cc:88:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   88 | int nibuu(auto a,auto b){
      |                  ^~~~