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

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<iomanip>
using namespace std;
using ll =long long;
const int MOD = 1000000007;
int main() {
	string S, T;
	cin >> S >> T;
	cout << T + S;


}
//////検証する数,超えられない数////
/*
long long cine(long long a, long long b) {
	if (a <= b) {
		return a;
	}
	else {
		return b;
	}
};*/
//vector型の初期化
/*
void vec_initialize(vector<ll>& a, const ll N) {
	ll c;

	for (int i = 0; i < N; i++) {

		cin >> c;
		a.push_back(c);

	}

};
void vec_pair_initialize(vector<pair<ll, ll>>& a, const ll N) {
	ll c, d;
	for (int i = 0; i < N; i++) {
		cin >> c >> d;
		a.push_back(make_pair(c, d));
	}
};
*/
int main() {
	ll N, C;
	vector<ll>s, t, c;
	cin >> N >> C;
	ll x,y,z;
	map<ll, ll>chanel;
	for (ll i = 0; i < N; i++) {
		cin >> x>>y>>z;
		s.push_back(2*x-1);
		t.push_back(2*y);
		c.push_back(z);
	}
	
	map<ll,ll>tmpc;
	
	for (ll i = 1; i <=C; i++) {
		vector<ll> tmps;
		vector<ll> tmpt;
		
		for (ll j = 0; j < N; j++) {
			if (c[j] == i) {
				tmps.push_back(s[j]);
				tmpt.push_back(t[j]);
				
				tmpc[i-1]++;
			}
		}
		sort(tmps.begin(), tmps.end());
		sort(tmpt.begin(), tmpt.end());
		for (ll j = 0; j < tmpc[i - 1]; j++) {
			if (j+1!=tmpc[i-1]&&tmps[j+1] < tmpt[j]) {
				tmps[j + 1] += 2;
			}
		}
		for (ll j = 0; j < tmpc[i - 1]; j++) {
			for (ll k = tmps[j]; k <= tmpt[j]; k++) {

				chanel[k]++;

			}
		}


	}
	ll big=0;
	for (auto i : chanel) {
		if (i.second > big) {

			big = i.second;
		}

	}

	cout <<big;


}

Compiler output:
a.cc:52:5: error: redefinition of 'int main()'
   52 | int main() {
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
struct tv{
   int s,t,c;
   bool operator < (tv &t){
      return c<t.c|| (c==t.c&&s<t.s);
   } 
};
int main(){
  int n,c;
  cin>>n>>c;
  vector<tv>t(n),v;
  rep(i,n)
    cin>>t[i].s>>t[i].t>>t[i].c;
    sort(t.begin(),t.end());
  int chn=0,z=-1,ans=0,time[100001]={};
  rep(i,n)
    if(chn!=t[i].c){
       rep(j,z+1) 
         for(int k=v[j].s;k<=v[j].t;k++){
            time[k]++;
            ans=max(ans,time[k]); 
         }
      v.clear();
      v.push_back(t[i]);
      chn=t[i].c;
      z=0;     
    }else{
       if(v[z].t>=t[i].s) {
          v[z].t=max(v[z].t,t[i].t); 
       }else{
          v.push_back(t[i]);
          z++;
       }
    }
  rep(i,z+1){
     for(int k=v[j].s;k<=v[j].t;k++){
       time[k]++;
       ans=max(ans,time[k]); 
     }
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:18: error: 'j' was not declared in this scope
   38 |      for(int k=v[j].s;k<=v[j].t;k++){
      |                  ^
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:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: Java

import javafx.scene.layout.BorderImage;

import java.io.*;
import java.util.*;

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/10;
    public static final int inf = Integer.MAX_VALUE/10;

    static void solve(InputReader in, PrintWriter out){
        int n = in.ni(), c = in.ni();
        int[][] use = new int[c][100001];
        for (int i = 0; i < n; i++) {
            int s = in.ni(), t = in.ni(), ch = in.ni()-1;
            use[ch][s-1] += 1;
            use[ch][t] -= 1;
        }
        for (int i = 0; i < c; i++) {
            for (int j = 1; j < use[0].length; j++) {
                use[i][j] = use[i][j]+use[i][j-1];
            }
        }
        int max = 0, count = 0;
        for (int i = 0; i < use[0].length; i++) {
            count = 0;
            for (int j = 0; j < c; j++) {
                if(use[j][i]>0) count++;
            }
            max = Math.max(max, count);
        }
        out.println(max);
    }

    public static void main(String[] args) throws Exception{
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public Double nd(){
            return Double.parseDouble(ns());
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

Compiler output:
Main.java:1: error: package javafx.scene.layout does not exist
import javafx.scene.layout.BorderImage;
                          ^
1 error
Language: C++

from operator import itemgetter
N, C = list(map(int, input().split()))

BA = []
for i in range(N):
  BA.append(list(map(int, input().split())))

BA.sort(key=itemgetter(2,0,1))

# 0.5刻みのIMOS
IMO = [0] * (200010)
prev_c = -1
prev_t = -1
tmax = 0
for i in range(N):
  s, t, c = BA[i]
  if prev_c == c and prev_t == s:
    IMO[2*s+1] += 1
    IMO[2*t+1] -= 1
  else:
    IMO[2*s-1] += 1
    IMO[2*t+1] -= 1
    
  prev_t, prev_c = t,c
  tmax = max(tmax, t)
  
for i in range(2*tmax+5):
  IMO[i+1] += IMO[i]
  
print(max(IMO[:2*tmax+5]))
#print(IMO[:2*tmax+5])

Compiler output:
a.cc:10:3: error: "0.5刻みのIMOS" after # is not a positive integer
   10 | # 0.5刻みのIMOS
      |   ^~~~~~~~~~~~~
a.cc:31:2: error: invalid preprocessing directive #print
   31 | #print(IMO[:2*tmax+5])
      |  ^~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from operator import itemgetter
      | ^~~~
Language: C++

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

int main(){
    int n, c; cin >> n >> c;
    vector<vector<int> > lis(n, vector<int>(3, 0));
    vector<
    for(int i = 0; i < n; i++){
        cin >> lis[i][0] >> lis[i][1] >> lis[i][2];
    }
    vector<int> anslis(200002, 0);
    for(int i = 1; i <= c; i++){
        vector<int> time(200002, 0);
        for(int l = 0; l < n; l++){
            if(lis[i][2] == i){
                time[lis[i][0]*2 - 1]++;
                time[lis[i][1] * 2]--;
            }
        }
        for(int l = 1; l < 200002; l++){
            time[l] += time[l-1];
        }
        for(int l = 1; l < 200002; l++){
            if(time[l] > 0){
                anslis[l]++;
            }
        }
    }
    int ans = 0;
    for(int i = 0; i < 200002; i++){
        if(ans < anslis[i]){
            ans = anslis[i];
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: template argument 1 is invalid
    9 |     for(int i = 0; i < n; i++){
      |                 ^
a.cc:9:17: error: template argument 2 is invalid
a.cc:9:20: error: 'i' was not declared in this scope
    9 |     for(int i = 0; i < n; i++){
      |                    ^
Language: C++

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

int main(){
    int n, c; cin >> n >> c;
    vector<vector<int> > lis(n, vector<int>(3, 0));
    vector<
    for(int i = 0; i < n; i++){
        cin >> lis[i][0] >> lis[i][1] >> lis[i][2];
    }
    vector<int> anslis(200002, 0);
    for(int i = 1; i <= c; i++){
        vector<int> time(200002, 0);
        for(int l = 0; l < n; l++){
            if(lis[i][2] == i){
                time[lis[i][0]*2 - 1]++;
                time[lis[i][1] * 2]--;
            }
        }
        for(int l = 1; l < 200002; l++){
            time[l] += time[l-1];
        }
        for(int l = 1; l < 200002; l++){
            if(time[l] > 0){
                anslis[l]++;
            }
        }
    }
    int ans = 0;
    for(int i = 0; i < 200002; i++){
        if(ans < anslis[l]){
            ans = anslis[l];
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: template argument 1 is invalid
    9 |     for(int i = 0; i < n; i++){
      |                 ^
a.cc:9:17: error: template argument 2 is invalid
a.cc:9:20: error: 'i' was not declared in this scope
    9 |     for(int i = 0; i < n; i++){
      |                    ^
a.cc:32:25: error: 'l' was not declared in this scope
   32 |         if(ans < anslis[l]){
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
const int MAX=100001;
signed main(){
  int N,C; cin>>N>>C;
  vector<bitset<30>> B;
  rep(i,0,N){
    int S,T,X;
    cin>>S>>T>>X;
    REP(j,S-1,T)B[X-1].set(j);
    }
  int ans=0;
  REP(i,0,MAX) ans=max(ans,B[i].count());
  cout<<ans<<endl;
  }


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

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <deque>
#include <queue>

using namespace std;
typedef long long ll;

int N,C;
int s[100005],t[100005], c[100005];
int tm[31][100005];
int mx[31];

int main(){
    cin >> N >> C;
    for(int i = 0; i < N; i++){
        cin >> s[i] >> t[i] >> c[i];
        for(int j = s[i]; j <= t[i]; j++)
            tm[c[i]][j] = 1;
        mx[c[i]] = max(t[i], mx[c[i]]);
    }

    int mx = 0;
    for(int i = 1; i <= 100005; i++){
        int cnt = 0;
        for(int j = 1; j <= C; j++){
            if(tm[j][i] == 1) cnt++;
        }
        if(mx <= cnt){
            mx = cnt;
            idx = i;
        }
    }
    cout << mx << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:13: error: 'idx' was not declared in this scope
   36 |             idx = i;
      |             ^~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
struct program
{
	int s,t,c;
};
int N,C;
int channel[31];
 
bool cmp(program a,program b)
{
	if(a.t==b.t)
	{
		return a.s < b.s;
	}
	return a.t < b.t;
}
 
int main(void) 
{
	cin.tie(0);
	ios::sync_with_stdio(false);
 
	program p;
	vector <program> v;
 
	cin >> N >> C;
 
	for(int i=0;i<N;i++)
	{
		cin >> p.s >> p.t >> p.c;
		v.push_back(p);
	}
 
	sort(v.begin(),v.end(),cmp);
	fill(channel,channel+31,1e9);
	int res = 0;
	int cnt = 0;
	for(int i=0;i<v.size();i++)
	{
		bool ok = false;
 
		for(int j=1;j<=C;j++)
		{
			if(v[i].c==j)
			{
				continue;
			}
			else
			{
				if(channel[j]<v[i].s)
				{
					ok = true;
					channel[j] = v[i].t;
					break;
				}
			}
		}
 		
 		if(!ok)
 		{
 			if(channel[v[i].c]<=v[i].s)
 			{
 				ok = true;
 				channel[j] = v[i].t;
 			}
 		}
 		
		if(!ok)
		{
			cnt++;
			res = max(res,cnt);
			channel[v[i].c] = v[i].t;
		}
 
		for(int j=1;j<=C;j++)
		{
			if(v[i].c==j)
			{
				if(channel[j]<=v[i].s)
				{
					cnt--;
					channel[j] = 1e9; 
 
				}
			}
			else
			{
				if(channel[j]<v[i].s)
				{
					cnt--;
					channel[j] = 1e9;
				}
			}
		}		
	}
 
	cout << res << '\n';
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:41: error: 'j' was not declared in this scope
   67 |                                 channel[j] = v[i].t;
      |                                         ^
Language: C++

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

int main(){
  int n, c;
  cin >> n >> c;
  vector<lint> s(n);
  vector<lint> t(n);
  vector<int> ch(n);
  set<pair<int, int>> num;
  for (int i=0; i<n; ++i){
    cin >> s[i] >> t[i] >> ch[i];
    ch[i]--;
  }
  const int TMAX = 200002;
  lint arr[c+1][TMAX];
  for (int i=0; i<=c; ++i){
    for (int j=0; j<TMAX; ++j){
      arr[i][j] = 0;
    }
  }
  for (int i=0; i<n; ++i){
    arr[ch[i]][2 * s[i] - 1]++;
  }
  for (int i=0; i<c; ++i){
    for (int j=0; j<TMAX-1; ++j){
      if(arr[i][j+1] == arr[i][j] && arr[i][j] > 0){
        arr[i][j+1] = 0;
        arr[i][j] = 0;
        num.insert(make_pair(i, j));
      }
    }
  }
  for (int i=0; i<n; ++i){
    if(num,find(make_pair(ch[i], t[i])) != num.end()){continue;}
    arr[ch[i]][2 * t[i]]--;
  }
  for (int i=0; i<c; ++i){
    for (int j=0; j<TMAX-1; ++j){
      arr[i][j+1] += arr[i][j];
    }
  }
  for (int j=0; j<TMAX; ++j){
    for (int i=0; i<c; ++i){
      arr[i+1][j] += arr[i][j];
    }
  }
  lint ans = 0;
  for (int i=0; i<TMAX; ++i){
    ans = max(ans, arr[c][i]);
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:16: error: no matching function for call to 'find(std::pair<int, long long int>)'
   36 |     if(num,find(make_pair(ch[i], t[i])) != num.end()){continue;}
      |            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: 'template<class _IIter, class _Tp> _IIter std::find(_IIter, _IIter, const _Tp&)'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:3842:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note:   candidate expects 4 arguments, 1 provided
In file included from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<utility>
#include<cmath>
#include<climits>
#include<queue>
#include<stack>
#include<numeric>
#include<set>
#include<iomanip>
#include<map>
using namespace std;


typedef long long ll;
#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)

const ll mod = 1000000007;
ll main(){
  ll N, C;
  cin >> N >> C;
  vector<ll> s(200001), t(200001), c(200001);

  rep(i, N) {
    cin >> s[i] >> t[i] >> c[i];
  }
  
  vector<ll> sm(200001);
  for(ll i = 1; i <= C; ++i){
    vector<ll> time(200001, 0);

    for(ll j = 0; j < N; ++j){
      if(c[j] == i){
        time[s[j] * 2 - 1]++;
        time[t[j] * 2]--;
      } 
    }

    ll m = 0;
    /*
    for(ll j = 1; j < 200001; ++j) time[j] += time[j - 1];
    for(ll j = 0; j < 200001; ++j) if(time[j] > 0) sm[j]++;
    */
    
    for(ll j = 0; j < 200001; ++j){
      m += time[j];
      if(m > 0) sm[j]++;
    }
  }

  ll ans = 0;
  for(ll i = 0; i < 200001; ++i){
    ans = max(ans, sm[i]);
  }

  cout << ans << endl;
}


Compiler output:
a.cc:21:1: error: '::main' must return 'int'
   21 | ll main(){
      | ^~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
#define t_max 100000 + 5
int v[30][t_max];

int main() {
    int N, C;
    cin >> N >> C;
    REP(i, N) {
        int a, b, c;
        cin >> a >> b >> c;
        v[c][a]++;
        v[c][b]--;
    }
    //録画機は、あるチャンネルの時刻
    // S から時刻 T までを録画するとき、時刻 S
    //− 0.5 から時刻 T までの間、他のチャンネルの録画に使うことができません。
    REP(i, N) {
        REP(j, 100004) { v[i][j + 1] += v[i][j]; }
    }
    //あとから録画開始時刻を1だけ早める（これで、同じチャンネルで連続して録画するときに重複をなくせる）。
    REP(i, c) {
        REP(j, t_max - 1) {
            if(v[i][j] == 0 && v[i][j + 1] == 1)
                v[i][j]++;
        }
    }
    int ans = 0;
    REP(j, t_max) {
        int cnt = 0;
        REP(i, c) {
            if(v[i][j])
                cnt++;
        }
        ans = max(ans, cnt);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:12: error: 'c' was not declared in this scope
   50 |     REP(i, c) {
      |            ^
a.cc:2:41: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(ll i = 0; i < (ll)n; i++)
      |                                         ^
a.cc:59:16: error: 'c' was not declared in this scope
   59 |         REP(i, c) {
      |                ^
a.cc:2:41: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(ll i = 0; i < (ll)n; i++)
      |                                         ^
Language: C++

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

#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define repr(i,n) for(int i=(n);i>=0;--i)
#define cinv(n,vec) VL (vec)(n);for(auto&v:vec)cin>>v;
#define int long long
#define itn int
#define pb push_back
#define m_p make_pair
#define m_t make_tuple
#define eb emplace_back
#define p_p(a,b) pb(m_p(a,b))
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(all(a),greater<>())
#define UNIQUE(a) a.erase(unique(all(a)),a.end())
#define SZ(a) (ll)(a.size())
#define ENDL cout<<endl
#define debg(a) cout<<#a<<" "<<a<<endl;
#define debgp(a) cout<<#a<<" "<<a.fi<<" : "<<a.se<<endl
#define call(a) for(auto i:a)cout<<i<<" ";cout<<endl
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define out(a) cout<<(a)<<endl
#define cont const auto
#define fi first
#define se second
#define V vector
#define P pair
#define T tuple
#define VV(type,name,y,x,a) vector<vector<type>> name = vector<vector<type>>(y,vector<type>(x,a))
#define PQ priority_queue
typedef long long ll;
typedef double D;
typedef long double LD;
typedef string str;
typedef vector<ll> VL;
typedef pair<ll,ll> PL;
typedef vector<pair<ll,ll>> VP;
typedef tuple<ll,ll,ll> T3;
typedef tuple<ll,ll,ll,ll> T4;
const long long INF = 1LL<<60;
const long long MOD = 1e9+7;
void Yes(){cout<<"Yes"<<endl;}
void No(){cout<<"No"<<endl;}
void YN(bool b){cout<<(b?"Yes":"No")<<endl;}
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
template<class T>inline bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int N,C;
  cin>>N>>C;
  VL s(N),t(N),c(N);
  rep(i,N)cin>>s[i]>>t[i]>>c[i];

  VL imos(1e5+10,0);
  rep(i,N){
    imos[s[i]]++;
    imos[t[i]+1]--;
  }
  reps(i,1e5+3)imos[i]+=imos[i-1];

  int res=0;
  for(auto a:imos)chmax(res,a);
  out(min(res,C);
  
  
  
  return 0;
}



Compiler output:
a.cc:77:1: error: unterminated argument list invoking macro "out"
   77 | 
      | ^
a.cc: In function 'int main()':
a.cc:71:3: error: 'out' was not declared in this scope
   71 |   out(min(res,C);
      |   ^~~
a.cc:71:6: error: expected '}' at end of input
   71 |   out(min(res,C);
      |      ^
a.cc:53:14: note: to match this '{'
   53 | signed main(){
      |              ^
Language: C++

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

int main(){
    int n, c;
    cin >> n >> c;
    vector<int> num(n+2);
    int s, t;
    for (int i = 0; i < n; i++){
        cin >> s >> t;
        num[s]++;
        num[t+1]--;
    }
    for (int i = 0; i < n + 1; i++){
        num[i+1] += num[i];
    }
    ans = 0;
    for (int i = 1; i <= n; i++){
        ans = max(ans, num[i]);
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     ans = 0;
      |     ^~~
      |     abs
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
const ll mo = 1000000007;
const ll INF = 1 << 30;
ll ans = 0;
ll ch[31][100100]={};
ll chh[31][100100]={};
ll chhh[100100]={};
 
int main()
{
ll n,c;
cin >> n>>c;
 
rep(i, n)
{
    ll s,t,c;
    cin >> s>>t>>c;
    if(ch[c][s]==0)ch[c][s]=1;
    else ch[c][s]=0;
    if(ch[c][t]==0)ch[c][t]=-1;
    else ch[c][t]=0;
}
rep1(i,c+1)rep1(j,100100){
    if(ch[i][j]==1){
        if(ch[i][j-1]!=-1){
            ch[i][j]=0;
            ch[i][j-1]=1;
        }
        else {
            ch[i][j]=0;
            ch[i][j-1]=0;
        }
    }
}
rep1(i,c+1)rep(j,100100){
    if(j==0) chh[i][j]=ch[i][j];
    else chh[i][j]=ch[i][j]+chh[i][j-1];
}
rep1(i,c+1)rep1(j,100100){
    chhh[j]+=chh[i][j];
}
rep1(j,100100){
    if(ans<chhh[j])ans=chhh[j];
}
/* for (int i = 0; i < 20; ++i) {
    cout << chh[1][i] << " ";
}cout  << endl;
for (int i = 0; i < 20; ++i) {
    cout << chh[2][i] << " ";
}cout  << endl;
 */
cout << ans << endl;
 
return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
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:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
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<iostream>

#define lli long long int

lli N,C;
lli imos[30][101010];

#define REP(i,n) for(lli i=0;i<n;i++)

int main(){

	cin>>N>>C;
	REP(i,n){
		lli a,b,c;
		cin>>a>>b>>c;
		a--;
		c--;
		imos[c][a]++;
		imos[c][b]--;
	}

	REP(c,C)for(lli i=1;i<101010;i++){
		imos[c][i]+=imos[c][i-1];
	}
	REP(c,C)for(lli i=0;i<101010;i++){
		if(imos[c][i])imos[c][i]=1;
	}

	lli ans = 0;
	REP(i,101010){
		lli cnt=0;
		REP(c,C)cnt+=imos[c][i];
		ans=max(ans,cnt);
	}
	cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |         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:15: error: 'n' was not declared in this scope
   13 |         REP(i,n){
      |               ^
a.cc:8:32: note: in definition of macro 'REP'
    8 | #define REP(i,n) for(lli i=0;i<n;i++)
      |                                ^
a.cc:33:21: error: 'max' was not declared in this scope; did you mean 'std::max'?
   33 |                 ans=max(ans,cnt);
      |                     ^~~
      |                     std::max
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,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:35:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   35 |         cout<<ans<<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:35:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   35 |         cout<<ans<<endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <queue>
#include <vector>

using namespace std;

struct Program
{
    int start, end, channel;
};

struct Recorder
{
    int time;
    int channel;

    bool operator<(const Recorder &other) const
    {
        return time > other.time;
    }
};

constexpr int MaxN = 100000 + 10;
Program P[MaxN];

int main()
{
    int n, c;
    cin >> n >> c;

    for (int i = 0; i < n; i++)
    {
        cin >> P[i].start >> P[i].end >> P[i].channel;
    }

    sort(P, P + n, [](auto & a, auto & b) { return a.start < b.start; });

    priority_queue<Recorder> recorders;

    for (int i = 0; i < n; i++)
    {
        const Program &p = P[i];
        vector<Recorder> vec;

        while (!recorders.empty())
        {
            Recorder r = recorders.top(); recorders.pop();

            if (r.time > p.start - (r.channel == p.channel ? 0 : 0.5))
            {
                vec.push_back(r);
            }
            else
            {
                recorders.push(r);
                break;
            }
        }

        if (!recorders.empty())
            recorders.pop();

        recorders.push({ p.end, p.channel });

        for (auto &r : vec)
            recorders.push(r);
    }

    cout << recorders.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   36 |     sort(P, P + n, [](auto & a, auto & b) { return a.start < b.start; });
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<string>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
typedef long long int llint;
typedef pair<ll, ll> pa;
#define MM 1000000000
#define MOD MM+7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define MAX_T 1001
#define Pair pair<int,int>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
#define INF (1 << 29) //536870912
const long double PI = acos(-1);
const ll DEP = 1e18;
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};
int N,C;
int s[100001],t[100001],c[100001];
int ss[200002],tt[200002];
int main(){
    cin >> N >> C;
    for(int i = 0; i < N; i++){
        cin >> 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 - 1]--;
        }
        for(int j = 1; j < 200002; j++){
            tt[j] += tt[j-1];
        }
        for(int j = 0; j< 200002; j++){
            if(tt[j] > 0){
                ss[j]++;
            }
        }
    }
    int mx = 0;
    for(int j = 0; j < 200002; j++){
        mx = max(mx,ss[j]);
    }
    cout << mx << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
a.cc:33:11: note: to match this '{'
   33 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

const int MAX = 100002;

int main() {
	int N, C;

	cin >> N >> C;


	vector<int> s(N), t(N), c(N);
	for (int i = 0; i < N; i++) {
		cin >> s[i] >> t[i] >> c[i];
		c[i]--;
	}

	vector<int> time(2 * MAX, 0), cnt(2 * MAX, 0);

	for (int i = 0; i < C; i++)
	{
		//初期化
		fill(time.begin(), time.end(), 0);
		//録画開始と停止を指定
		for (int j = 0; j < N; j++) if (c[j] == i) time[2 * s[j] - 1]++, time[2 * t[j]]--;
		//録画時間を塗りつぶす
		for (int j = 0; j < 2 * MAX - 1; j++) time[j + 1] += time[j];
		//チェンネルiがレコーダーを専有する時間を塗りつぶす
		for (int j = 0; j < 2 * MAX; j++) if (tt[j] > 0)cnt[j]++;
	}
	int ans = 0;
	for (int i = 0; i < 2 * MAX; j++) ans = max(ans, cnt[i]);

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:55: error: 'tt' was not declared in this scope; did you mean 't'?
   32 |                 for (int j = 0; j < 2 * MAX; j++) if (tt[j] > 0)cnt[j]++;
      |                                                       ^~
      |                                                       t
a.cc:35:38: error: 'j' was not declared in this scope
   35 |         for (int i = 0; i < 2 * MAX; j++) ans = max(ans, cnt[i]);
      |                                      ^
Language: C++

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

#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;

void solve(ll N, ll C, vector<ll> s, vector<ll> t, vector<ll> c){
    ll P[C][10001];
    ll mm = 0;
    rep(i, N) {
        mm = max(mm, t[i]);
        for(int j=s[i]; j<=t[i]; j++) {
            P[c[i]-1][j] = 1;
        }
    }
    vector<ll> Q(10001);
    fil(Q.begin(), Q.end(). 0);
    rep(i, C) {
        rep(j, 10001) {
            Q[j] += P[i][j];
        }
    }
    ll mx = 0;
    rep(i, mm) {
        mx = max(mx, Q[i]);
    }
    cout << mx << endl;
}

int main() {
  ll N;
    scanf("%lld",&N);
    ll C;
    scanf("%lld",&C);
    vector<ll> s(N);
    vector<ll> t(N);
    vector<ll> c(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&s[i]);
        scanf("%lld",&t[i]);
        scanf("%lld",&c[i]);
    }
  solve(N, C, move(s), move(t), move(c));
  return 0;
}


Compiler output:
a.cc: In function 'void solve(ll, ll, std::vector<long long int>, std::vector<long long int>, std::vector<long long int>)':
a.cc:17:29: error: expected unqualified-id before numeric constant
   17 |     fil(Q.begin(), Q.end(). 0);
      |                             ^
a.cc:17:5: error: 'fil' was not declared in this scope
   17 |     fil(Q.begin(), Q.end(). 0);
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool I[32][100009]; int N, C, s[100009], t[100009], dp[100009];
int main() {
	cin >> N >> C;
	for (int i = 0; i < N; i++) {
		cin >> s[i] >> t[i] >> c[i];
		for (int j = s[i]; j < t[i]; j++) I[c[i]][j] = true;
	}
	for (int i = 1; i <= C; i++) {
		int F = 0;
		for (int j - 0; j <= 100008; j++) {
			if (I[i][j - 1] == false && I[i][j] == true) f = j;
			if (I[i][j - 1] == true && I[i][j] = false) {
				dp[j]--; dp[F - 1]++;
			}
		}
	}
	for (int i - 1; i <= 100008; i++) dp[i] += dp[i - 1];
	int maxn = 0;
	for (int i = 0; i <= 100008; i++) maxn = max(dp[i], maxn);
	cout << maxn << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: 'c' was not declared in this scope
    7 |                 cin >> s[i] >> t[i] >> c[i];
      |                                        ^
a.cc:12:27: error: expected ';' before '-' token
   12 |                 for (int j - 0; j <= 100008; j++) {
      |                           ^~
      |                           ;
a.cc:12:44: error: expected ')' before ';' token
   12 |                 for (int j - 0; j <= 100008; j++) {
      |                     ~                      ^
      |                                            )
a.cc:12:46: error: 'j' was not declared in this scope
   12 |                 for (int j - 0; j <= 100008; j++) {
      |                                              ^
a.cc:19:19: error: expected ';' before '-' token
   19 |         for (int i - 1; i <= 100008; i++) dp[i] += dp[i - 1];
      |                   ^~
      |                   ;
a.cc:19:36: error: expected ')' before ';' token
   19 |         for (int i - 1; i <= 100008; i++) dp[i] += dp[i - 1];
      |             ~                      ^
      |                                    )
a.cc:19:38: error: 'i' was not declared in this scope
   19 |         for (int i - 1; i <= 100008; i++) dp[i] += dp[i - 1];
      |                                      ^
Language: C++

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

int main()
{
    int n, C;
    cin >> n >> C;
    vector<int> s(n), t(n), c(n), sm(2*n+2), tt(2*n+2);
    for(int i=0; i<n; i++)
    {
        cin >> s[i] >> t[i] >> c[i];
    }

    for(int i=0; i<=C; i++)
    {
        for(int j=0; j<2*n+2; 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<n; j++)
        {
            tt[j] += tt[j-1]
        }
        for(int j=0; j<2*n+2; j++)
        {
            if(tt[j] > 0) sm[j]++;
        }
    }

    int mx = 0;
    for(int j=0; j<2*n+2; j++)
    {
        if(mx < sm[j]) mx = sm[j];
    }

    cout << mx;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected ';' before '}' token
   26 |             tt[j] += tt[j-1]
      |                             ^
      |                             ;
   27 |         }
      |         ~
Language: C++

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

int main()
{
    int n, C;
    cin >> n >> C;
    vector<int> s(n), t(n), c(n), sm(2*n+2), tt(2*n+2);
    for(int i=0; i<n; i++)
    {
        cin >> s[i] >> t[i] >> c[i];
    }

    for(int i=0; i<=C; i++)
    {
        for(int j=0; j<2*n+2; 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=0; j<n; j++)
        {
            tt[j] += tt[j-1]
        }
        for(int j=0; j<2*n+2; j++)
        {
            if(tt[j] > 0) sm[j]++;
        }
    }

    int mx = 0;
    for(int j=0; j<2*n+2; j++)
    {
        if(mx < sm[j]) mx = sm[j];
    }

    cout << mx;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected ';' before '}' token
   26 |             tt[j] += tt[j-1]
      |                             ^
      |                             ;
   27 |         }
      |         ~
Language: C++

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

int main()
{
    int n, C;
    cin >> n >> C;
    vector<int> s(n), t(n), c(n), sm(2*n+2), tt(2*n*2);
    for(int i=0; i<n; i++)
    {
        cin >> s[i] >> t[i] >> c[i];
    }

    for(int i=0; i<=C; i++)
    {
        for(int j=0; j<2*n+2; 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=0; j<n; j++)
        {
            tt[j] += tt[j-1]
        }
        for(int j=0; j<2*n+2; j++)
        {
            if(tt[j] > 0) sm[j]++;
        }
    }

    int mx = 0;
    for(int j=0; j<2*n+2; j++)
    {
        if(mx < sm[j]) mx = sm[j];
    }

    cout << mx;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected ';' before '}' token
   26 |             tt[j] += tt[j-1]
      |                             ^
      |                             ;
   27 |         }
      |         ~
Language: C++

}
#include<bits/stdc++.h>

using namespace std;

int main() {
  int N, C;
  cin >> N >> C;

  int time[100010];
  memset(time, 0, sizeof(time));
  vector<vector<pair<int, int>>> vec(C, vector<pair<int, int>>());
  for (int i = 0; i < N; i++) {
    int s, t, c;
    cin >> s >> t >> c;
    c--;
    vec[c].push_back({s, t});
  }

  for (int i = 0; i < C; i++) {
    sort(vec[i].begin(), vec[i].end());
    for (int j = 0; j < vec[i].size(); j++) {
      int s = vec[i][j].first;
      int t = vec[i][j].second;

      while(j < vec[i].size() -1 && vec[i][j].second == vec[i][j + 1].first) {
        t = vec[i][j+1].second;
        j++;
      }
      time[s-1]++;
      time[t]--;
    }
  }

  int maxv = 0;
  for(int i = 1; i < 100000; i++) {
    time[i] += time[i -1];
    maxv = max(maxv, time[i]);
  }

  cout << maxv << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: expected declaration before '}' token
    1 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n, s, ans=-1e9, d, k[105][15], l[105][15];
int main() {
	cin>>n;
	for(int i=1; i<=n; ++i){
      for(int j=1; j<=10; ++j){
        cin>>k[i][j];
      }
    }
	for(int i=1; i<=n; ++i){
      for(int j=0; j<=10; ++j) {
        cin>>l[i][j];
      }
    }
	for(int bit=1; bit<(1<<10); ++bit) {
		for(int j=0; j<10; ++j) {
          k[0][j+1] = k & (1<<j);
        }
		s = 0;
		for(int i=1; i<=n; ++i) {
			for(int j=1, d=0; j<=10; ++j) {
              d += k[0][j] && k[i][j];
            }
			s += l[i][d];
		}
		ans = max(ans, s);
	}
	cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: invalid operands of types 'int [105][15]' and 'int' to binary 'operator&'
   18 |           k[0][j+1] = k & (1<<j);
      |                       ~ ^ ~~~~~~
      |                       |     |
      |                       |     int
      |                       int [105][15]
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll n,C;cin>>n>>C;
  double s[n],t[n],c[n];
  vector<double>tukeru[31],kesu[31];
  vector<pair<double,double>>v[31];
  for(ll i=0;i<n;i++){
    cin>>s[i]>>t[i]>>c[i];
    v[c[i]].push_back(make_pair(s[i],t[i]));
  }
  for(ll i=1;i<31;i++){
    if(v[i].size()==0)continue;
    sort(v[i].begin(),v[i].end());
    tukeru[i].push_back(v[i][0].first-0.5);
    kesu[i].push_back(v[i][0].second);
    for(ll j=1;j<v[i].size();j++){
      ll f=v[i][j].first,s=v[i][j].second;
      if(f==kesu[i].back()){
        kesu[i].pop_back();
      }
      else{
        //kesu[i][kesu[i].size()-1]++;
        tukeru[i].push_back(f-0.5);
      }
      kesu[i].push_back(s);
    }
    //kesu[i][kesu[i].size()-1]++;
  }
  //for(ll i=1;i<=C;i++)for(ll j=0;j<kesu[i].size();j++)cout<<tukeru[i][j]<<endl;
  ll now=0,ans=0;
  ll ban[31];
  //cout<<tukeru[2][0];return 0;
  fill(ban,ban+31,0);
  for(double i=0;i<=100000;i+=0.5){
    for(ll j=1;j<31;j++){
      if(v[j].size()==0)continue;
      if(tukeru[j][ban[j]]==i){
        now++; 
      }
      if(kesu[j][ban[j]]==i){
        now--;
        ban[j]++;
      }
      //cout<<j<<" "<<ban[j]<<endl;
    }
   //if(i<=100)cout<<now<<endl;
      ans=max(now,ans);
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid types 'std::vector<std::pair<double, double> > [31][double]' for array subscript
   11 |     v[c[i]].push_back(make_pair(s[i],t[i]));
      |      ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(int i=0; i<int(n); i++)
#define FOR(i,m,n) for(int i=int(m); i<int(n); i++)
#define ALL(obj) (obj).begin(),(obj).end()
#define VI vector<int>
#define VLL vector<long long>
#define VVI vector<vector<int>>
#define VVLL vector<vector<long long>>
#define VC vector<char>
#define VS vector<string>
#define VVS vector<vector<string>>
#define VVC vector<vector<char>>
#define fore(i,a) for(auto &i:a)
typedef long long ll;
const int  INF = 2147483647;
const ll INFL = 9223372036854775807;
const ll mod = 1000000007;




int main() {
	int n, c;
	cin >> n >> c;
	VVI v(100010, VI(c, 0));
	REP(i, n) {
		int s, t, cc;
		cin >> s >> t >> cc;
		cc--;
		v[s][cc]++;
		v[t][cc]--;
	}
	int ans = 0, res = 0;
	REP(i, 100009) {
		REP(j, c) {
			v[i + 1][j] += v[i][j];
		}
	}
	REP(i, 100009) {
		REP(j, c) {
			if (v[i][j] == 0 && v[i + 1][j] == 1)v[i][j] = 1;
		}
	}
	int ans = 0;
	REP(i, 100005) {
		int res = 0;
		REP(j, c) {
			res += v[i][j];
		}
		ans = max(ans, res);
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:13: error: redeclaration of 'int ans'
   47 |         int ans = 0;
      |             ^~~
a.cc:36:13: note: 'int ans' previously declared here
   36 |         int ans = 0, res = 0;
      |             ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

#define C_MAX 30
#define N_MAX 100000

int main(){
  int n, c;
  cin >> n >> c;

  bool r[N_MAX][C_MAX];

  REP(i, N_MAX){
    REP(j, C_MAX){
      r[i][j] = 0;
    }
  }

  int min_x = N_MAX;
  int max_y = 0;
  REP(i, n){
    int x, y, z;
    cin >> x >> y >> z;
    FOR(j, x - 1, y - 1){
      r[j][z - 1] = 1;
    }
    min_x = min(min_x, x - 1);
    max_y = max(max_y, y - 1);
  }

  int ans = 1;
  FOR(i, min_x, max_y){
    ans = max(ans, accumulate(r[i], r[i] + C_MAX, 0));
  }

  cout << ans << endl;


/*
  vector<int> s, t, c;
  REP(i, n){
    int x, y, z;
    cin >> x >> y >> z;
    s.push_back(a);
    t.push_back(b);
    c.push_back(a);
  }
*/
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:20: error: 'accumulate' was not declared in this scope
   56 |     ans = max(ans, accumulate(r[i], r[i] + C_MAX, 0));
      |                    ^~~~~~~~~~
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:11: fatal error: cstdio : No such file or directory
    1 | #include  <cstdio >
      |           ^~~~~~~~~
compilation terminated.