Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <iostream>
#include <climits>
#include <cstring>
#include <functional>
using namespace std;

#define rep(i,N) for(int i = 0;i < N;++i)
using LL = long long;

typedef pair<LL, LL> P;

LL time[100001];
int lasttime;
int N,k;

int main() {
	cin >> N >> k;
	rep(i, N) {
		int s, t, c;
		cin >> s >> t >> c;
		lasttime = max(lasttime, t);
		for (int j = s; j <= t; ++j) {
			time[j]++;
			
		}
	}
	sort(time, time + lasttime + 1,greater<LL>());
	cout << time[0] << endl;
	return 0;
}

Compiler output:
a.cc:20:15: error: 'LL time [100001]' redeclared as different kind of entity
   20 | LL time[100001];
      |               ^
In file included 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/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:9:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:31:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   31 |                         time[j]++;
      |                               ^
a.cc:31:31: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   31 |                         time[j]++;
      |                         ~~~~~~^
a.cc:31:31: error: lvalue required as increment operand
   31 |                         time[j]++;
      |                               ^
a.cc:35:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   35 |         sort(time, time + lasttime + 1,greater<LL>());
      |                    ~~~~~^~~~~~~~~~
a.cc:35:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   35 |         sort(time, time + lasttime + 1,greater<LL>());
      |                    ~~~~~~~~~~~~~~~~^~~
a.cc:36:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   36 |         cout << time[0] << endl;
      |                       ^
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int (*)(long int*) noexcept; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<long long int> >]':
/usr/include/c++/14/bits/stl_algo.h:4805:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = long int (*)(long int*) noexcept; _Compare = greater<long long int>]'
 4805 |       std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:35:6:   required from here
   35 |         sort(time, time + lasttime + 1,greater<LL>());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1906:50: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
 1906 |                                 std::__lg(__last - __first) * 2,
      |                                           ~~~~~~~^~~~~~~~~