Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)

int n, c;
int time[200001];
int main()
{
	cin >> n >> c;
	REP(i, 0, 200001) time[i] = 0;

	REP(i, 0, n) {
		int s, t, c;
		cin >> s >> t >> c;
		time[2 * s - 1]++;
		time[2 * t]--;
	}
	int ans = 0;
	REP(i, 1, 200001) {
		time[i] += time[i - 1];
		ans = max(ans, time[i]);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:8:16: error: 'int time [200001]' redeclared as different kind of entity
    8 | int time[200001];
      |                ^
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:1:
/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:12:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         REP(i, 0, 200001) time[i] = 0;
      |                                 ^
a.cc:12:35: error: assignment of read-only location '*(time + ((sizetype)i))'
   12 |         REP(i, 0, 200001) time[i] = 0;
      |                           ~~~~~~~~^~~
a.cc:17:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   17 |                 time[2 * s - 1]++;
      |                               ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
a.cc:17:31: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   17 |                 time[2 * s - 1]++;
      |                 ~~~~~~~~~~~~~~^
a.cc:17:31: error: lvalue required as increment operand
   17 |                 time[2 * s - 1]++;
      |                               ^
a.cc:18:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |                 time[2 * t]--;
      |                           ^
a.cc:18:27: warning: ISO C++ forbids decrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   18 |                 time[2 * t]--;
      |                 ~~~~~~~~~~^
a.cc:18:27: error: lvalue required as decrement operand
   18 |                 time[2 * t]--;
      |                           ^
a.cc:22:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |                 time[i] += time[i - 1];
      |                       ^
a.cc:22:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |                 time[i] += time[i - 1];
      |                                      ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
a.cc:22:25: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to binary 'operator+'
   22 |                 time[i] += time[i - 1];
      |                 ~~~~~~~~^~~~~~~~~~~~~~
a.cc:22:25: note:   in evaluation of 'operator+=(time_t(time_t*) noexcept {aka long int(long int*) noexcept}, time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept})'
a.cc:23:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   23 |                 ans = max(ans, time[i]);
      |                                      ^
a.cc:23:26: error: no matching function for call to 'max(int&, time_t (&)(time_t*) noexcept)'
   23 |                 ans = max(ans, time[i]);
      |                       ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:23:26: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'})
   23 |                 ans = max(ans, time[i]);
      |                       ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:23:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   23 |                 ans = max(ans, time[i]);
      |                       ~~~^~~~~~~~~~~~~~