criyle/codenet-compile-errors huggingface dataset:
Language: C++

# include <cstdio>
int main()
{
	int N , C ;
	int s [100000] , t [100000] , c [100000];
	int sm [200002];
	int tt [200002];
	
	scanf("%d %d" ,&N ,& C );
	for(int i =0;i < N ;i++)	scanf("%d %d %d" ,& s[i] ,&t[i] ,&c[i]);
	for(int i =1;i <= C ;i++)
	{	
		for(int j =0; j <200002; j++) tt[j]=0;
		for(int j =0; j < N ; j++) if (c[j]== i) tt[s[j]*2-1]++, tt[t[j]*2] --;
		for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
		for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
	}
	int mx =0;
	for (int j =0;j <200002;j++) if( mx < sm[j]) mx = sm[j];
	printf ("%d\n" ,mx );

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'intj' was not declared in this scope; did you mean 'int'?
   15 |                 for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
      |                     ^~~~
      |                     int
a.cc:15:30: error: 'j' was not declared in this scope
   15 |                 for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
      |                              ^
a.cc:16:21: error: 'intj' was not declared in this scope; did you mean 'int'?
   16 |                 for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
      |                     ^~~~
      |                     int
a.cc:16:30: error: 'j' was not declared in this scope
   16 |                 for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
      |                              ^
Language: C++

# include <cstdio>
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main()
{
	scanf("%d %d" ,&N ,& C );
	for(int i =0;i < N ;i++)	scanf("%d %d %d" ,& s[i] ,&t[i] ,&c[i]);
	for(int i =1;i <= C ;i++)
	{	
		for(int j =0; j <200002; j++) tt[j]=0;
		for(int j =0; j < N ; j++) if (c[j]== i) tt[s[j]*2-1]++, tt[t[j]*2] --;
		for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
		for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
	}
	int mx =0;
	for (int j =0;j <200002;j++) if( mx < sm[j]) mx = sm[j];
	printf ("%d\n" ,mx );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'intj' was not declared in this scope; did you mean 'int'?
   14 |                 for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
      |                     ^~~~
      |                     int
a.cc:14:30: error: 'j' was not declared in this scope
   14 |                 for(intj =1; j <200002; j++) tt[j]+= tt[j-1];
      |                              ^
a.cc:15:21: error: 'intj' was not declared in this scope; did you mean 'int'?
   15 |                 for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
      |                     ^~~~
      |                     int
a.cc:15:30: error: 'j' was not declared in this scope
   15 |                 for(intj =0; j <200002; j++) if(tt[j] >0) sm[j]++;
      |                              ^
Language: C++

#include <iostream>
#include <vector>
#include <deque>
using namespace std;

int main() {
	int N, C; cin >> N >> C;
	vector<deque<pair<int, int>>> vs(C);
	for (int i=0; i<N; i++) {
		int s, t, c; cin >> s >> t >> c;
		c--;
		vs[c].emplace_back(s, t);
	}

	for (int i = 0; i < C; i++) {
		sort(vs[i].begin(), vs[i].end());
	}

	for (int i = 0; i < C; i++) {
		if (vs[i].empty()) continue;
		deque<pair<int, int>> nv;
		nv.push_back(vs[i][0]);
		for (int j = 1; j < (int)vs[i].size(); j++) {
			if (nv.back().second == vs[i][j].first) {
				auto e = nv.back();
				nv.pop_back();
				e.second = vs[i][j].second;
				nv.push_back(e);
			} else {
				nv.push_back(vs[i][j]);
			}
		}
		vs[i] = nv;
	}
/*
	for (int i = 0; i < C; i++) {
		for (auto e: vs[i]) {
			cout << "(" << e.first << ", " << e.second << ") ";
		}
		cout << "\n";
	}
*/
	vector<int> line(100001);
	for (auto channel: vs) {
		for (auto p: channel) {
			for (int i = p.first; i <= p.second; i++) {
				line[i]++;
			}
		}
	}
	cout << *max_element(line.begin(), line.end()) << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |                 sort(vs[i].begin(), vs[i].end());
      |                 ^~~~
      |                 short
a.cc:51:18: error: 'max_element' was not declared in this scope
   51 |         cout << *max_element(line.begin(), line.end()) << "\n";
      |                  ^~~~~~~~~~~
Language: C++

#include <cstdio> 
#include<iostream>
int N,C; 
int s[100000],t[100000],c[100000]; 
int sm[200002]; int tt[200002]; 
int main() { 
	scanf_s("%d%d",&N,&C); 
	for(int i=0;i<N;i++) scanf_s("%d%d%d",&s[i],&t[i],&c[i]); 
	for(int i=1;i<=C;i++) { 
		for(int j=0;j<200002;j++)tt[j]=0; 
		for(int j=0;j<N;j++)if(c[j]==i)tt[s[j]*2-1]++,tt[t[j]*2]--; 
		for(int j=1;j<200002;j++)tt[j]+=tt[j-1]; 
		for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++; }
	int mx=0; for(int j=0;j<200002;j++)if(mx<sm[j])mx=sm[j]; printf("%d\n",mx);

	//system("pause");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d%d",&N,&C);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <cstdio > int N,C; int s[100000],t[100000],c[100000]; int sm[200002]; int tt[200002]; int main() { scanf("%d%d",&N,&C); for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]); for(int i=1;i<=C;i++) { for(int j=0;j<200002;j++)tt[j]=0; for(int j=0;j<N;j++)if(c[j]==i)tt[s[j]*2-1]++,tt[t[j]*2]--; for(int j=1;j<200002;j++)tt[j]+=tt[j-1]; for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++; } int mx=0; for(int j=0;j<200002;j++)if(mx<sm[j])mx=sm[j]; printf("%d

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N,C; int s[100000],t[100000],c[100000]; int sm[200002]; int tt[200002]; int main() { scanf("%d%d",&N,&C); for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]); for(int i=1;i<=C;i++) { for(int j=0;j<200002;j++)tt[j]=0; for(int j=0;j<N;j++)if(c[j]==i)tt[s[j]*2-1]++,tt[t[j]*2]--; for(int j=1;j<200002;j++)tt[j]+=tt[j-1]; for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++; } int mx=0; for(int j=0;j<200002;j++)if(mx<sm[j])mx=sm[j]; printf("%d
      |                    ^~~
a.cc:1:456: warning: missing terminating " character
    1 | #include <cstdio > int N,C; int s[100000],t[100000],c[100000]; int sm[200002]; int tt[200002]; int main() { scanf("%d%d",&N,&C); for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]); for(int i=1;i<=C;i++) { for(int j=0;j<200002;j++)tt[j]=0; for(int j=0;j<N;j++)if(c[j]==i)tt[s[j]*2-1]++,tt[t[j]*2]--; for(int j=1;j<200002;j++)tt[j]+=tt[j-1]; for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++; } int mx=0; for(int j=0;j<200002;j++)if(mx<sm[j])mx=sm[j]; printf("%d
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N,C; int s[100000],t[100000],c[100000]; int sm[200002]; int tt[200002]; int main() { scanf("%d%d",&N,&C); for(int i=0;i<N;i++) scanf("%d%d%d",&s[i],&t[i],&c[i]); for(int i=1;i<=C;i++) { for(int j=0;j<200002;j++)tt[j]=0; for(int j=0;j<N;j++)if(c[j]==i)tt[s[j]*2-1]++,tt[t[j]*2]--; for(int j=1;j<200002;j++)tt[j]+=tt[j-1]; for(int j=0;j<200002;j++)if(tt[j]>0)sm[j]++; } int mx=0; for(int j=0;j<200002;j++)if(mx<sm[j])mx=sm[j]; printf("%d
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int ans,cnt;
set<int>r;
map<int,vector<int>>dp;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a,b;
    cin>>a>>b;
    while(a--){
        int b,c,d;
        cin>>b>>c>>d;
        dp[b].push_back(d);
        dp[c].push_back(-d);
    }
    for(auto &p:dp){
        for(int i:p.second){
            if(i>0){
                r.insert(i);
            }
        }
        ans=max(ans,r.size());
        for(int i:p.second){
            if(i<0){
                r.erase(-i);
            }
        }
    }
    cout<<ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: no matching function for call to 'max(int&, std::set<int>::size_type)'
   23 |         ans=max(ans,r.size());
      |             ~~~^~~~~~~~~~~~~~
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: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:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::set<int>::size_type' {aka 'long unsigned int'})
   23 |         ans=max(ans,r.size());
      |             ~~~^~~~~~~~~~~~~~
/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:
/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:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   23 |         ans=max(ans,r.size());
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <numeric>
#include <queue>
#include <map> 
#include <set>
#include <string>
#include <functional>
#include <list>
#include <random>
#include <time.h>
#include <iomanip>
#define int long long
#define double long double
#define oku7 1000000007
#define MAXN (int)1e+5 * 2+1
#define LL_MAX 9223372036854775807	//ない環境用
#define LL_HALFMAX 9223372036854775807 / 2	//ない環境用
using namespace std;
std::mt19937 mt((int)time(0));

int dx[4] = { 0, 1, 0, -1 }; // x軸方向への変位
int dy[4] = { 1, 0, -1, 0 }; // y軸方向への変位
int imos[2000000];
int ch[31][2000000];
int chend[2000000][31];
signed main() {
	//imos[i]は時刻2iを表す。時刻0は0、1は2、1.5は3。
	int N, C;
	cin >> N >> C;
	for (int i = 0; i < N; i++) {
		int s, t, c;
		cin >> s >> t >> c;
		//imos[s * 2 -1] += 1;
		//imos[t * 2 ] -= 1;

		//始点と終点が被っていたら
		if (ch[c][s * 2] == -1) {
			ch[c][s * 2] = 0;
			ch[c][t * 2] -= 1;
			continue;
		}
		if (ch[c][t * 2] == 1) {
			ch[c][s * 2 - 1] += 1
				ch[c][t * 2] = 0;
		}

		ch[c][s * 2 - 1] += 1;
		ch[c][t * 2] -= 1;

	}
	//チャンネルごとにチューナー使うかを計算

	for (int channel = 1; channel <= C; channel++) {
		for (int i = 1; i <= 200005; i++) {
			ch[channel][i] = ch[channel][i - 1] + ch[channel][i];
		}

	}

	int ans=-1;

	for (int i = 1; i < 200005; i++) {
		int num = 0;
		for (int channel = 1; channel <= C; channel++) {
			num += ch[channel][i];
		}
		if (ans < num) ans = num;
	}



	cout << ans << "\n";


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:46: error: expected ';' before 'ch'
   47 |                         ch[c][s * 2 - 1] += 1
      |                                              ^
      |                                              ;
   48 |                                 ch[c][t * 2] = 0;
      |                                 ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int T[2000005];int L[2000005];
int main(){
	
	int N,C;
	cin>>N>>C;
	int s[N],t[N],c[N];
	for(int i=0;i<N;++i) cin>>s[i]>>t[i]>>c[i];
	
	for(int i=0;i<N;++i){
		s[i]=2*s[i]-1;
		t[i]=2*t[i];
	}
	
	for(int i=0;i<N;++i){
		L[s[i]]++;L[t[i]]--;
	}
	
	long long int ans=0;
	T[0]=L[0];
	for(int i=0;i<2000003;++i){
		T[i+1]=T[i]+L[i+1];
		
		ans=max(ans,T[i]);
	}
	
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: no matching function for call to 'max(long long int&, int&)'
   26 |                 ans=max(ans,T[i]);
      |                     ~~~^~~~~~~~~~
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: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:26:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |                 ans=max(ans,T[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:
/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:26:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |                 ans=max(ans,T[i]);
      |                     ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main () {
    
    int N, C;
    scanf("%d %d", &N, &C);

    int span = 100000;
    vector<vector<int> > c(C, vector<int>(span * 2 + 1 0));

    for (int i = 0; i < N; i++) {
        int s, t, channel;
        scanf("%d %d %d", &s, &t, &channel);
        s *= 2; t *= 2; channel--;

        c[channel][s - 1]++;
        if (t < span * 2) {
            c[channel][t + 1]--;
        }
    }

    for (int i = 0; i < span * 2 + 1; i++) {
        for (int j = 1; j < C; j++) {
            c[j][i] += c[j-1][i];
        }
    }

    int ans = 0, cnt = 0;
    for (int i = 0; i < span * 2 + 1; i++) {
        cnt += c[C - 1][i];
        ans = max(ans, cnt);
    }
    printf("%d\n", ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:42: error: expected primary-expression before '(' token
   10 |     vector<vector<int> > c(C, vector<int>(span * 2 + 1 0));
      |                                          ^
a.cc:10:55: error: expected ')' before numeric constant
   10 |     vector<vector<int> > c(C, vector<int>(span * 2 + 1 0));
      |                                          ~            ^~
      |                                                       )
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.NoSuchElementException;

public class Main {
	private static final PrintStream ps = System.out;
	private static final InputStream IS = System.in;
	private static final byte[] BUFFER = new byte[1024];
	private static int ptr = 0;
	private static int buflen = 0;

	static final int A = (int) 100000;
	
	public static void main(String[] args) {
		int n = ni();
		int C = ni();
		int[] count = new int[A+1];
		int[][] st  = new int[C+1][A+1]; // 0: なし,　1： s, 2: t
		
		for (int i = 0; i < n; i++) {
			int s = ni(), t = ni(), c = ni();
			if (st[c][s] == 2) {
				s++;
			}
			if (st[c][t] == 1) {
				t--;
			}
			st[c][s] = 1;
			st[c][t] = 2;
			for (int j = s-1; j < t; j++) {
				count[j]++;
			}
		}
		U.dump2DArray(st);
		
		int max = Integer.MIN_VALUE;
		for (int i = 0; i <= A; i++) {
			max = Math.max(max, count[i]);
		}

		ps.println(max);
	}

	private static boolean hasNextByte() {
		if (ptr < buflen)
			return true;
		else {
			ptr = 0;
			try {
				buflen = IS.read(BUFFER);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0)
				return false;
		}
		return true;
	}

	private static int readByte() {
		if (hasNextByte())
			return BUFFER[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public static boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(BUFFER[ptr]))
			ptr++;
		return hasNextByte();
	}

	public static String n() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public static long nl() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b)
			throw new NumberFormatException();
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b))
				return minus ? -n : n;
			else
				throw new NumberFormatException();
			b = readByte();
		}
	}

	public static int ni() {
		long nl = nl();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public static double nextDouble() {
		return Double.parseDouble(n());
	}

	private static int[] nia(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
}


Compiler output:
Main.java:35: error: cannot find symbol
		U.dump2DArray(st);
		^
  symbol:   variable U
  location: class Main
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REPI(x,y)	for (int i=(x);i<(y);i++)
#define REPJ(x,y)	for (int j=(x);j<(y);j++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef vector<vector<pair<int, int>>> G;
typedef pair<int, int> P;

int i,j,N;
bool F[100][10];
int Q[100][11];
int pmax;

int main() {
	cin >> N;
	
	REPI(0,N) REPJ(0,10) cin >> F[i][j];
	REPI(0,N) REPJ(0,11) cin >> P[i][j];
	
	REPI(1,1024) {
		int x = 0;
		int cnt = 0;
		REPJ(0,N) {
			for (int k=0; k<10;k++) if (i&(1<<k)) cnt += F[i][k];
			x += Q[i][cnt]
		}
		pmax = MAX(x, pmax);
	}
	
	cout << pmax;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:38: error: expected primary-expression before '[' token
   27 |         REPI(0,N) REPJ(0,11) cin >> P[i][j];
      |                                      ^
a.cc:34:39: error: expected ';' before '}' token
   34 |                         x += Q[i][cnt]
      |                                       ^
      |                                       ;
   35 |                 }
      |                 ~
Language: C++

#include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>


using namespace std;

struct pro {
  int s;
  int t;
  int c;

  operator<(pro r) {
    if (c < r.c) {
      return true;
    } else if (c > r.c) {
      return false;
    }
    if (s < r.s) {
      return true;
    };
    return false;
  }
};

int main(){
  int n,c;
  cin >> n>>c;
  vector<pro> f(n);
  for (auto& e : f) {
    cin >> e.s >> e.t >> e.c;
  }
  sort(f.begin(),f.end());
  for(int i=0;i<n-1;i++){
    if(f[i].t==f[i+1].s){
      f[i].t=f[i+1].t;
      n=n-1;
      f.erase(f.begin()+i+1);
    }
  }

  // cout << "--" << endl;
  // for(auto& p : f)cout<<p.s<<" "<<p.t<<" "<<p.c<<endl;
  int rec[100000]={0};
  for(int i=0;i<n;i++){
    for(int j=f[i].s;j<f[i].t+1;j++)rec[j]+=1;
  }
  cout<<*max_element(&rec[0],&rec[99999])<<endl;
  return 0;
}


Compiler output:
a.cc:14:3: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
   14 |   operator<(pro r) {
      |   ^~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <utility>
using namespace std;

using PP = pair<int, int>;

int N, C;
vector<PP> V[30];
int A[100002];

int main() {
  cin >> N >> C;
  for(int i = 0; i < N; ++i) {
    int a, b, c;
    cin >> a >> b >> c;
    V[c - 1].push_back(PP(a - 1, b - 1));
  }
  
  for(int k = 0; k < C; ++k) {
    sort(V[k].begin(), V[k].end());
  }
  
  for(int k = 0; k < C; ++k) {
    int prev = -10009;
    for(PP p : V[k]) {
      if(prev == p.first) ++A[prev + 1];
      else ++A[p.first];
      --A[p.second + 1];
      prev = p.second;
    } 
  }
  
  partial_sum(A, A + 100002, A);
  int mx = 0;
  for(int i = 0, i < 100002; ++i) {
    mx = max(mx, A[i]);
  }
  cout << mx << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:19: error: expected ';' before '<' token
   38 |   for(int i = 0, i < 100002; ++i) {
      |                   ^~
      |                   ;
a.cc:38:20: error: expected primary-expression before '<' token
   38 |   for(int i = 0, i < 100002; ++i) {
      |                    ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
 
int descending_compare(const void *a, const void *b){
    return (int)(*(int*)b - *(int*)a);
}
 
int ascending_compare(const void *a, const void *b){
    return (int)*(int*)a - *(int*)b;
}
 
int s[100000+9];
int t[100000+9];
int c[100000+9];
int merge[200000];
int time[200000] = {0};
 
int main(void){
    int N, C;
    int i, j;
    int max = 0;
    scanf("%d %d", &N, &C);
 
    for (i = 0; i < N; i++){
        scanf("%d %d %d", &s[i], &t[i], &c[i]);
    }
 
    for (i = 1; i <= C; i++){
        for (j = 0; j < =100000; j++){
            merge[j] = 0;
        }
        for (j = 0; j < N; j++){
            if (c[j] == i){
                merge[s[j]] = 1;
                merge[t[j]+1] = -1;
            }
        }
        for (j = 1; j <=100000; j++){
            merge[j] += merge[j-1];
        }
        for (j = 0; j <=100000; j++){
            if (merge[j] > 0){
                time[j]++;
            }
        }
    }
 
    for (i = 0; i <=100000; i++){
        max = time[i]>max?time[i]:max;
    }
 
    printf("%d\n", max);
 
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: expected primary-expression before '=' token
   31 |         for (j = 0; j < =100000; j++){
      |                         ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
 
int descending_compare(const void *a, const void *b){
    return (int)(*(int*)b - *(int*)a);
}
 
int ascending_compare(const void *a, const void *b){
    return (int)*(int*)a - *(int*)b;
}
 
int s[100000];
int t[100000];
int c[100000];
int merge[200000];
int time[200000] = {0};
 
int main(void){
    int N, C;
    int i, j;
    int max = 0;
    scanf("%d %d", &N, &C);
 
    for (i = 0; i < N; i++){
        scanf("%d %d %d", &s[i], &t[i], &c[i]);
    }
 
    for (i = 1; i <= C; i++){
        for (j = 0; j < =100000; j++){
            merge[j] = 0;
        }
        for (j = 0; j < N; j++){
            if (c[j] == i){
                merge[s[j]] = 1;
                merge[t[j]+1] = -1;
            }
        }
        for (j = 1; j <=100000; j++){
            merge[j] += merge[j-1];
        }
        for (j = 0; j <=100000; j++){
            if (merge[j] > 0){
                time[j]++;
            }
        }
    }
 
    for (i = 0; i <=100000; i++){
        max = time[i]>max?time[i]:max;
    }
 
    printf("%d\n", max);
 
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: expected primary-expression before '=' token
   31 |         for (j = 0; j < =100000; j++){
      |                         ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
 
int descending_compare(const void *a, const void *b){
    return (int)(*(int*)b - *(int*)a);
}
 
int ascending_compare(const void *a, const void *b){
    return (int)*(int*)a - *(int*)b;
}
 
int s[100000];
int t[100000];
int c[100000];
int merge[200000];
int time[200000] = {0};
 
int main(void){
    int N, C;
    int i, j;
    int max = 0;
    scanf("%d %d", &N, &C);
 
    for (i = 0; i < N; i++){
        scanf("%d %d %d", &s[i], &t[i], &c[i]);
    }
 
    for (i = 1; i <= C; i++){
        for (j = 0; j < =100000; j++){
            merge[j] = 0;
        }
        for (j = 0; j < N; j++){
            if (c[j] == i){
                merge[s[j]*2-1] = 1;
                merge[t[j]*2] = -1;
            }
        }
        for (j = 1; j <=100000; j++){
            merge[j] += merge[j-1];
        }
        for (j = 0; j <=100000; j++){
            if (merge[j] > 0){
                time[j]++;
            }
        }
    }
 
    for (i = 0; i <=100000; i++){
        max = time[i]>max?time[i]:max;
    }
 
    printf("%d\n", max);
 
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: expected primary-expression before '=' token
   31 |         for (j = 0; j < =100000; j++){
      |                         ^
Language: C++

#include "cstdio"
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
scanf ("% d % d " ,&N ,& C );
for ( int i =0; i < N ; i ++)
scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
for ( int i =1; i <= C ; i ++)
{
for ( int j =0; j <200002; j ++) tt [ j ]=0;
for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
}
int mx =0;
for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
printf ("% d \ n " , mx );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:92: error: expected primary-expression before ';' token
   14 | for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
      |                                                                                            ^
a.cc:20:9: warning: unknown escape sequence: '\040'
   20 | printf ("% d \ n " , mx );
      |         ^~~~~~~~~~
Language: C++

include "cstdio"
int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
scanf ("% d % d " ,&N ,& C );
for ( int i =0; i < N ; i ++)
scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
for ( int i =1; i <= C ; i ++)
{
for ( int j =0; j <200002; j ++) tt [ j ]=0;
for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
}
int mx =0;
for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
printf ("% d \ n " , mx );
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include "cstdio"
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:21: error: 'N' was not declared in this scope
    8 | scanf ("% d % d " ,&N ,& C );
      |                     ^
a.cc:8:26: error: 'C' was not declared in this scope
    8 | scanf ("% d % d " ,&N ,& C );
      |                          ^
a.cc:8:1: error: 'scanf' was not declared in this scope
    8 | scanf ("% d % d " ,&N ,& C );
      | ^~~~~
a.cc:14:92: error: expected primary-expression before ';' token
   14 | for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
      |                                                                                            ^
a.cc:20:9: warning: unknown escape sequence: '\040'
   20 | printf ("% d \ n " , mx );
      |         ^~~~~~~~~~
a.cc:20:1: error: 'printf' was not declared in this scope
   20 | printf ("% d \ n " , mx );
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include "cstdio"
Language: C++

int N , C ;
int s [100000] , t [100000] , c [100000];
int sm [200002];
int tt [200002];
int main ()
{
scanf ("% d % d " ,&N ,& C );
for ( int i =0; i < N ; i ++)
scanf ("% d % d % d " ,& s [ i ] ,& t [ i ] ,& c [ i ]);
for ( int i =1; i <= C ; i ++)
{
for ( int j =0; j <200002; j ++) tt [ j ]=0;
for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
for ( int j =1; j <200002; j ++) tt [ j ]+= tt [j -1];
for ( int j =0; j <200002; j ++) if ( tt [ j ] >0) sm [ j ]++;
}
int mx =0;
for ( int j =0; j <200002; j ++) if ( mx < sm [ j ]) mx = sm [ j ];
printf ("% d \ n " , mx );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'scanf' was not declared in this scope
    7 | scanf ("% d % d " ,&N ,& C );
      | ^~~~~
a.cc:13:92: error: expected primary-expression before ';' token
   13 | for ( int j =0; j < N ; j ++) if ( c [ j ]== i ) tt [ s [ j ]*2 -1]++ , tt [ t [ j ]*2] - -;
      |                                                                                            ^
a.cc:19:9: warning: unknown escape sequence: '\040'
   19 | printf ("% d \ n " , mx );
      |         ^~~~~~~~~~
a.cc:19:1: error: 'printf' was not declared in this scope
   19 | printf ("% d \ n " , mx );
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int N , C ;
Language: C++

#include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <utility>
#include <map>
#include <set>
#include <algorithm>

#define REP(i, a, b) for (int i=a; i <b; i++)
#define F first
#define S second

using namespace std;

typedef long long ll;
typedef vector< int > vi;

int main() {
    int n, ch;
    scanf("%d %d", &n, &ch);

    vector <pair<int, pair<int, int>>> input(n);
    REP(i, 0, n) {
        scanf("%d %d %d", &input[i].S.F, &input[i].S.S, &input[i].F);
    }

    int ind = 0;
    sort(input.begin(), input.end());

    while(ind < n) {
        if (input[ind].F == input[ind+1].F && input[ind].S.S == input[ind+1].S.F) {
            input[ind+1].S.F = input[ind].S.F;
            input[ind].F = -1;
            input[ind].S.F = -1;
            input[ind].S.S = -1;
        }
        ind++;
    }

    //REP(i, 0, input.size()) {
    //    printf("channel: %d, start: %d, end: %d\n", input[i].F, input[i].S.F, input[i].S.S);
    //}
    vector <pair< int, int> > c(n);
    vector <pair<int, int>> end(n);

    REP(i, 0, n) {
            c[i].F = input[i].S.F;
            c[i].S = input[i].F;
            end[i].F = input[i].S.S;
            end[i].S = input[i].F;
    }

    sort(c.begin(), c.end());
    sort(end.begin(), end.end());
    //printf("contents of c[i]\n");
    //REP(i, 0, c.size()) {
    //    printf("channel: %d, start: %d, end: %d\n", c[i].S, c[i].F.F, c[i].F.S);
    //}

    set< int > st;
    int max = 0;
    int i_start = 0, i_end = 0;

    while(c[i_start].F >= 0) {
        i_start++;
    }

    while(end[i_end].F >= 0) {
        i_end++;
    }

    REP(i, 0, 100010*2) {
        if (i %2 == 1) {
            while((i_start < m) && (c[i_start].F == (i/2+1))) {
              st.insert(c[i_start].S);
                i_start++;
            //    printf("*******insert happen********\n");
            }
        }
        
        if (i%2 == 0) {
            while((i_end < m) && (end[i_end].F == (i/2))) {
                st.erase(end[i_end].S);
                i_end++;
            }
        }
        if(st.size() > max) {
            max = st.size();
        }
        //printf("%d loop: st.size() is %d\n", i, st.size());
    }

    printf("%d\n", max);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:30: error: 'm' was not declared in this scope
   76 |             while((i_start < m) && (c[i_start].F == (i/2+1))) {
      |                              ^
a.cc:84:28: error: 'm' was not declared in this scope
   84 |             while((i_end < m) && (end[i_end].F == (i/2))) {
      |                            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;

int IMOS[200002];

struct TV {
	int s, t, c;
	TV(int s=0, int t=0, int c=0):s(s),t(t),c(c){}

	bool operator<(const TV& r)const {
		return s < r.s;
	}
};

int main() {
	int N, C; cin >> N >> C;
	vector<vector<TV>>tv(C);
	for (int i = 0; i < N; i++) {
		int s, t, c; cin >> s >> t >> c;
		tv[c-1].push_back(TV(s, t, c));
	}
	for (int i = 0; i < C; i++)sort(tv[i].begin(), tv[i].end());
	for (int i = 0; i < C; i++) {
		int last = 0;
		for (int j = 1; j < tv[i].size(); j++) {
			if (tv[i][j].s == tv[i][j - 1].t) {
				tv[i][last].t = tv[i][j].t;
				tv[i][j].s = 0;
				j--;
			}
			else {
				last = j;
			}
		}
	}
	for (int i = 0; i < C; i++) {
		for (int j = 0; j < tv[i].size(); j++) {
			tv[i][j].s = tv[i][j].s * 2 - 1;
			tv[i][j].t = tv[i][j].t * 2;

			if (tv[i][j].s == -1)continue;

			IMOS[tv[i][j].s]++;
			IMOS[tv[i][j].t]--;
		}
	}

	int ans = IMOS[0];
	for (int i = 0; i < 200001; i++) {
		IMOS[i + 1] += IMOS[i];
		ans = max(ans, IMOS[i + 1]);

Compiler output:
a.cc: In function 'int main()':
a.cc:54:45: error: expected '}' at end of input
   54 |                 ans = max(ans, IMOS[i + 1]);
      |                                             ^
a.cc:52:42: note: to match this '{'
   52 |         for (int i = 0; i < 200001; i++) {
      |                                          ^
a.cc:54:45: error: expected '}' at end of input
   54 |                 ans = max(ans, IMOS[i + 1]);
      |                                             ^
a.cc:18:12: note: to match this '{'
   18 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
//#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
int ary[30][1000006]={0};
#define mp make_pair
signed main(){
    int n,C; cin>>n>>C;
    rep(i,n){
        int a,b,c;cin>>a>>b>>c;
        --c;a*=10;b*=10;
        ary[c][a-5]++;
        ary[c][b]--;
    }
    rep(i,30){
        rep(j,100002-1)ary[i][j+1]+=ary[i][j];
    }
    int ans=0;
    rep(j,1000002-1){
        int cnt=0;
        rep(i,30){
            if(assert(ary[i][j]==1||ary[i][j]==0));
            if(ary[i][j])cnt++;
        }
        cmax(ans,cnt);
    }
    cout<<ans<<endl;
}


Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
                 from a.cc:1:
a.cc: In function 'int main()':
a.cc:40:16: error: could not convert '(((ary[i][j] == 1) || (ary[i][j] == 0)) ? (void)0 : __assert_fail(((const char*)"ary[i][j]==1||ary[i][j]==0"), __builtin_FILE(), ((unsigned int)__builtin_LINE()), ((const char*)(& __PRETTY_FUNCTION__))))' from 'void' to 'bool'
   40 |             if(assert(ary[i][j]==1||ary[i][j]==0));
      |                ^~~~~~
      |                |
      |                void
Language: C

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 0
//#ifdef LOCAL
//#define DEBUG(s) cout << (s) << endl
//#define dump(x)  cerr << #x << " = " << (x) << endl
//#define BR cout << endl;
//#else
//#define DEBUG(s) do{}while(0)
//#define dump(x) do{}while(0)
//#define BR
//#endif


//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 20)
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl

//ここから編集する


int main() {
    int N, C;
    cin >> N >> C;
    vector<pair<int, int> > cst[C + 1];
    int imos[200005] = {};
    rep(i, 0, N) {
        int s, t, c;
        cin >> s >> t >> c;
        cst[c].emplace_back(s, t);
    }
    rep(i, 0, C + 1) {
//        cout << "i = " << i << endl;
        sort(all(cst[i]));
        for (int j = 0; j < cst[i].size(); j++) {
//            cout << "first :" << cst[i][j].first << ",second :" << cst[i][j].second << endl;
            if (j > 0) {
                if (cst[i][j - 1].second == cst[i][j].first) {
//                    imos[cst[i][j].first * 2]++;
                    imos[cst[i][j-1].second * 2 + 1]++;
                    imos[cst[i][j].second * 2 + 1]--;
                } else {
                    imos[cst[i][j].first * 2 - 1]++;
                    imos[cst[i][j].second * 2 + 1]--;
                }
            } else {
                imos[cst[i][j].first * 2 - 1]++;
                imos[cst[i][j].second * 2 + 1]--;
            }
        }
    }

    rep(i, 1, 100005) {
        imos[i] += imos[i - 1];
    }
    int ans = 0;
    rep(i, 0, 100005) {
        ans = max(ans, imos[i]);
    }


    cout << ans << endl;


//    int a,b,c;
//    cin >> a >> b >> c;
//    vector<int> v[a][b][c];
//    int ar[a][b][c];
//    rep(i,0,a){
//        rep(j,0,b){
//            rep(k,0,c){
//                cin >> ar[i][j][k];
//            }
//        }
//    }
//    rep(i,0,a){
//        rep(j,0,b){
//            rep(k,0,c){
//                cout << ar[i][j][k] << " ";
//            }
//            cout << endl;
//        }
//        cout << "---" << endl;
//    }

    return 0;
}


Compiler output:
main.c:1:10: fatal error: algorithm: No such file or directory
    1 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
#define MAX 100000

struct program {int st;int en;int ch; };

program p[MAX];

bool order(program &q1,program &q2) {
	return q1.st < q2.st;
}

int main() {
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < n; i++) {
		scanf_s("%d%d%d", &p[i].st, &p[i].en, &p[i].ch);
	}
	program rec[30];
	program p0;
	p0.st = -1; p0.en = -1; p0.ch = -1;
	for (int i = 0; i < 30; i++) {
		rec[i] = p0;
	}
	sort(p, p+n, order);
	for (int i = 0; i < n; i++) {
		int j = 0;
		while (((rec[j].en >= p[i].st) || (rec[j].ch == p[i].ch)) && ((rec[j].en > p[i].st )|| (rec[j].ch != p[i].ch))) {
			j++;
		}
		rec[j] = p[i];
	}
	int cnt = 0;
	while (rec[cnt].ch != -1) {
		cnt++;
	}
	cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   19 |                 scanf_s("%d%d%d", &p[i].st, &p[i].en, &p[i].ch);
      |                 ^~~~~~~
      |                 scanf
Language: C++


#include <iostream>

using namespace std;

int main()
{
  int N, C;
  float s[100000], t[100000];
  int c[100000];

  cin >> N >> C;

  for(int i = 0; i < N; i++)
    cin >> s[i] >> t[i] >> c[i];

  int cc, max = 0;
  for(int i = 0; i < N; i++)
  {
    cc = 1;
    for(int j = i+1; j < N; j++)
      if(((s[i]-0.5f <= s[j]-0.5f && t[i] > s[j]-0.5f) || (s[i]-0.5f <= t[j] && t[i] > t[j]) || (s[i]-0.5f > s[j]-0.5f && t[i] <= t[j])) && c[i] != c[j])
        cc++;
    if(max < cc)
      max = cc;
    if(max>=C)
      break;
  }

  cout << max << endl;
  return 0;
}
~    

Compiler output:
a.cc:33:2: error: expected class-name at end of input
   33 | ~
      |  ^
Language: C++

#include <iostream>

int main()
{
  int N, C;
  int s[100000], t[100000], c[100000];

  cin >> N >> C;

  for(int i = 0; i < N; i++)
    cin >> s[i] >> t[i] >> c[i];

  int c, max = 0;
  for(int i = 0; i < N; i++)
  {
    c = 0;
    for(int j = i; j < N; j++)
      if(s[i]-0.5 <= s[j] && t[i] > t[j] && c[i] != c[j])
        c++;
    if(max < c)
      max = c;
  }

  cout << max << endl;
  return 0;
}
~   

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> N >> C;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:7: error: conflicting declaration 'int c'
   13 |   int c, max = 0;
      |       ^
a.cc:6:29: note: previous declaration as 'int c [100000]'
    6 |   int s[100000], t[100000], c[100000];
      |                             ^
a.cc:16:7: error: incompatible types in assignment of 'int' to 'int [100000]'
   16 |     c = 0;
      |     ~~^~~
a.cc:19:9: error: lvalue required as increment operand
   19 |         c++;
      |         ^
a.cc:20:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |     if(max < c)
      |        ~~~~^~~
a.cc:21:13: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   21 |       max = c;
      |             ^
      |             |
      |             int*
a.cc:24:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |   cout << max << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |   cout << max << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:27:2: error: expected class-name at end of input
   27 | ~
      |  ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;

long long MOD = 1000000007;

int main() {
    
    int N,C;
    cin >> N >> C;
    int A[2*(100000+1)] = {0};
    
    vector< vector< pair< long long, long long> > > T(C);
    for ( int i = 0; i < N; i++ ) {
        long long s,t;
        int c;
        cin >> s >> t >> c;
        c--;
        T[c].push_back( make_pair(s,t) );
        
    }
    vector< vector< pair< long long, long long> > > T2(C);
    for ( int i = 0; i < C; i++ ) {
        sort( T[i].begin(), T[i].end() );
        
        if ( T[i].size() == 0 ) { continue; }
        
        T2[i].push_back( make_pair(T[i][0].first,T[i][0].second) );
        
        for ( int j = 1; j < T[i].size(); j++ ) {
            if ( T[i][j].first == T[i][j-1].second ) {
                long long f = T2[i].back.first;
                T2[i].pop_back();
                T2[i].push_back( make_pair(f, T[i][j].second) );
            }
            else { T2[i].push_back( T[i][j] ); }
        }
    }
    
    for ( int i = 0; i < C; i++ ) {
        
        for ( int j = 0; j < T2[i].size(); j++ ) {
          
            A[T2[i][j].first*2-1]++;
            A[T2[i][j].second*2]--;
        }
        
    }
    for ( int i = 1; i < 2*(100000+1); i++ ) {
        A[i] += A[i-1];
    }
    
    int ans = 0;
    for ( int i = 1; i < 2*(100000+1); i++ ) {
        ans = max( ans, A[i] );
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:37: error: invalid use of member function 'std::vector<std::pair<long long int, long long int> >::back' (did you forget the '()' ?)
   43 |                 long long f = T2[i].back.first;
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;

long long MOD = 1000000007;

int main() {
    
    int N,C;
    cin >> N >> C;
    int A[2*(100000+1)] = {0};
    
    vector< vector< pair< long long, long long> > > T(C);
    for ( int i = 0; i < N; i++ ) {
        long long s,t;
        int c;
        cin >> s >> t >> c;
        c--;
        T[c].push_back( make_pair(s,t) );
        
    }
    vector< vector< pair< long long, long long> > > T2(C);
    for ( int i = 0; i < C; i++ ) {
        sort( T[i].begin(), T[i].end() );
        
        if ( T[i].size() == 0 ) { continue; }
        
        T2[i].push_back( make_pair(T[i][0].first,T[i][0].second) );
        
        for ( int j = 1; j < T[i].size(); j++ ) {
            if ( T[i][j].first == T[i][j-1].second ) {
                long long f = T2[i].first;
                T2[i].pop_back();
                T2[i].push_back( make_pair(f, T[i][j].second) );
            }
            else { T2[i].push_back( T[i][j] ); }
        }
    }
    
    for ( int i = 0; i < C; i++ ) {
        
        for ( int j = 0; j < T2[i].size(); j++ ) {
          
            A[T2[i][j].first*2-1]++;
            A[T2[i][j].second*2]--;
        }
        
    }
    for ( int i = 1; i < 2*(100000+1); i++ ) {
        A[i] += A[i-1];
    }
    
    int ans = 0;
    for ( int i = 1; i < 2*(100000+1); i++ ) {
        ans = max( ans, A[i] );
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:37: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair<long long int, long long int> > >, std::vector<std::pair<long long int, long long int> > >::value_type' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'first'
   43 |                 long long f = T2[i].first;
      |                                     ^~~~~