Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
vpll st(10005);
vll cc(10005);
vvll tm(20005, vll(31));
struct Solution {
    void solve(std::istream& in, std::ostream& out) {
        ll n, c;
        in >> n >> c;
        for (int i = 0; i < n; i++) {
            in >> st[i].first >> st[i].second >> cc[i];
            st[i].first--;
            st[i].first *= 2;
            st[i].second--;
            st[i].second *= 2;
            cc[i]--;
            tm[st[i].first][cc[i]]++;
            tm[st[i].second + 1][cc[i]]--;
        }
        ll ans = 0;
        for (int i = 0; i < 20000; i++) {
            ll tmp = 0;
            for (int j = 0; j < c; j++) {
                tm[i + 1][j] += tm[i][j];
                tmp += tm[i + 1][j];
            }
            ans = max(ans, tmp);
        }
        out << ans << '\n';
    }
};
void solve(std::istream& in, std::ostream& out) {
    out << std::setprecision(12);
    Solution solution;
    solution.solve(in, out);
}
#include <fstream>
#include <iostream>
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    istream& in = cin;
    ostream& out = cout;
    solve(in, out);
    return 0;
}


Compiler output:
a.cc: In member function 'void Solution::solve(std::istream&, std::ostream&)':
a.cc:22:13: error: reference to 'tm' is ambiguous
   22 |             tm[st[i].first][cc[i]]++;
      |             ^~
In file included from /usr/include/time.h:39,
                 from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:10:6: note:                 'vvll tm'
   10 | vvll tm(20005, vll(31));
      |      ^~
a.cc:23:13: error: reference to 'tm' is ambiguous
   23 |             tm[st[i].second + 1][cc[i]]--;
      |             ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:10:6: note:                 'vvll tm'
   10 | vvll tm(20005, vll(31));
      |      ^~
a.cc:29:17: error: reference to 'tm' is ambiguous
   29 |                 tm[i + 1][j] += tm[i][j];
      |                 ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:10:6: note:                 'vvll tm'
   10 | vvll tm(20005, vll(31));
      |      ^~
a.cc:29:33: error: reference to 'tm' is ambiguous
   29 |                 tm[i + 1][j] += tm[i][j];
      |                                 ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:10:6: note:                 'vvll tm'
   10 | vvll tm(20005, vll(31));
      |      ^~
a.cc:30:24: error: reference to 'tm' is ambiguous
   30 |                 tmp += tm[i + 1][j];
      |                        ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:10:6: note:                 'vvll tm'
   10 | vvll tm(20005, vll(31));
      |      ^~