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

#include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int solve(){
	int minnum;
	z=  (int)(pow (e,1/3));
	y = (int)(sqrt(e - pow(z, 3)));
	x = (int)(e - pow(z, 3)-pow(y, 2)); 
	mininum = x+y+z;
	return mininum;
};
int main(){
	int A[100000];
    int k = 0;
	while( cin>>e && e>0 )
	{
		A[k]=solve();
        k++;
	}
	for(int l = 0;l < k; l++)
    {
        cout<<A[l]<<endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int solve()':
a.cc:11:9: error: 'mininum' was not declared in this scope; did you mean 'minnum'?
   11 |         mininum = x+y+z;
      |         ^~~~~~~
      |         minnum
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int minnum;
int solve(){
	z=  (int)(pow (e,1/3));
	y = (int)(sqrt(e - pow(z, 3)));
	x = (int)(e - pow(z, 3)-pow(y, 2)); 
	mininum = x+y+z;
	return mininum;
};
int main(){
	int A[100000];
    int k = 0;
	while( cin>>e && e>0 )
	{
		A[k]=solve();
        k++;
	}
	for(int l = 0;l < k; l++)
    {
        cout<<A[l]<<endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int solve()':
a.cc:11:9: error: 'mininum' was not declared in this scope; did you mean 'minnum'?
   11 |         mininum = x+y+z;
      |         ^~~~~~~
      |         minnum
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;

int main(){
	int A[100000];
    int k = 0;
	while( cin>>e && e>0 )
	{
		A[k]=solve();
        k++;
	}
	for(int l = 0;l < k; l++)
    {
        cout<<A[l]<<endl;
    }
	return 0;
}

int solve(){
	int minnum = 1000000;
	for(int z = 0; pow(z, 3) <= e; z++)
	{
		y = (int)sqrt(e - pow(z, 3));
		minnum = min(minnum,(int)(e - pow(z, 3)-pow(y, 2))+y+z); 
	}
	return minnum;
};

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'solve' was not declared in this scope
   12 |                 A[k]=solve();
      |                      ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;



int main(){

	int e;
	while(true){

		cin>>e;
		if(e==0) break;
		int x,y,z;
		int xm,ym,zm;
		int csum,msum=1000000;
		zm=(int) pow(e,1.0/3);
		//cout<<"zm"<<zm<<endl;
		for (int i = zm; i >=0; --i)
		{
			z=i;
			ym=(int)sqrt(e-pow(z,3));
			for (int j = ym; j >= 0; --j)
			{
				y=j;
				x=e-pow(z,3)-pow(y,2);
				csum=x+y+z;
				if(csum<msum){
					msum=csum;
				}
			}
		}
	}	
	cout<<msum<<endl;

	


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: 'msum' was not declared in this scope
   34 |         cout<<msum<<endl;
      |               ^~~~
Language: C++

#include<iostream>
using namespace std;


int main() {
	int e;
	while (cin >> e; e>0) {
		int y=0;
		int z=0;
		int sum=0,summin=e; // min: NOTICE how we initialize it

		while (y**3+z**3<e) {
			while (y**3+z**3<e) {
				x= e-y**3+z**3;	
				sum = x+y+z;
				if (sum < summin) summin = sum;
				++z;
			}
			++y;
		}
		cout << summin << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before ';' token
    7 |         while (cin >> e; e>0) {
      |               ~        ^
      |                        )
a.cc:7:29: error: expected ';' before ')' token
    7 |         while (cin >> e; e>0) {
      |                             ^
      |                             ;
Language: C++

#include<iostream>
using namespace std;


int main() {
	int e;
	while (cin >> e && e>0) {
		int y=0;
		int z=0;
		int sum=0,summin=e; // min: NOTICE how we initialize it

		while (y**3+z**3<e) {
			while (y**3+z**3<e) {
				x= e-y**3+z**3;	
				sum = x+y+z;
				if (sum < summin) summin = sum;
				++z;
			}
			++y;
		}
		cout << summin << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: invalid type argument of unary '*' (have 'int')
   12 |                 while (y**3+z**3<e) {
      |                          ^~
a.cc:12:31: error: invalid type argument of unary '*' (have 'int')
   12 |                 while (y**3+z**3<e) {
      |                               ^~
a.cc:13:34: error: invalid type argument of unary '*' (have 'int')
   13 |                         while (y**3+z**3<e) {
      |                                  ^~
a.cc:13:39: error: invalid type argument of unary '*' (have 'int')
   13 |                         while (y**3+z**3<e) {
      |                                       ^~
a.cc:14:33: error: 'x' was not declared in this scope
   14 |                                 x= e-y**3+z**3;
      |                                 ^
a.cc:14:40: error: invalid type argument of unary '*' (have 'int')
   14 |                                 x= e-y**3+z**3;
      |                                        ^~
a.cc:14:45: error: invalid type argument of unary '*' (have 'int')
   14 |                                 x= e-y**3+z**3;
      |                                             ^~
Language: C++

#include<iostream>
using namespace std;


int main() {
	int e;
	while (cin >> e && e>0) {
		int y=0;
		int z=0;
		int sum=0,summin=e; // min: NOTICE how we initialize it

		while (y*y*y+z*z*z<e) {
			while (y*y*y+z*z*z<e) {
				x= e-y**3+z**3;	
				sum = x+y+z;
				if (sum < summin) summin = sum;
				++z;
			}
			++y;
		}
		cout << summin << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
   14 |                                 x= e-y**3+z**3;
      |                                 ^
a.cc:14:40: error: invalid type argument of unary '*' (have 'int')
   14 |                                 x= e-y**3+z**3;
      |                                        ^~
a.cc:14:45: error: invalid type argument of unary '*' (have 'int')
   14 |                                 x= e-y**3+z**3;
      |                                             ^~
Language: C++

#include<iostream>
using namespace std;


int main() {
	int e;
	while (cin >> e && e>0) {
		int y=0;
		int z=0;
		int sum=0,summin=e; // min: NOTICE how we initialize it

		while (y*y*y+z*z*z<e) { // third power of something
			while (y*y*y+z*z*z<e) {
				x= e-y*y*y+z*z*z;	
				sum = x+y+z;
				if (sum < summin) summin = sum;
				++z;
			}
			++y;
		}
		cout << summin << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
   14 |                                 x= e-y*y*y+z*z*z;
      |                                 ^
Language: C++

#include<iostream>
using namespace std;


int main() {
	int e;
	while (cin >> e && e>0) {
		int y=0;
		int z=0;
		int sum=0,summin=e; // min: NOTICE how we initialize it

		while (y*y*y+z*z*z<e) { // third power of something
			while (y*y*y+z*z*z<e) {
				x= e-y*y*y-z*z*z;	
				sum = x+y+z;
				if (sum < summin) summin = sum;
				++z;
			}
			++y;
		}
		cout << summin << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'x' was not declared in this scope
   14 |                                 x= e-y*y*y-z*z*z;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(x) for(auto it=(x).begin();it!=(x).end();it++) 
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
 
using namespace std;
 
int main(){
    while(1){
        int e;
        int ans=1e9+7;
        cin>>e;
        if(e==0)break;
         
        rep(y,0,1000){
            rep(z,0,1000){
                int k=e-y*y-z*z*z;
                if(k<0)continue;
                ans=min(ans,x+y+z);
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:29: error: 'x' was not declared in this scope
   32 |                 ans=min(ans,x+y+z);
      |                             ^
Language: C++

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

int main(){
  while(1){
    int x,y,z,e;
    cin>>e;
    if(e==0){break;}

    for(int i=1;;i++){
      if(e<i*i*i){z=i-1; break;}
    }
    
    int Z=z*z*z;
    for(int q=1;;q++){
      if(e-Z<q*q){y=q-1; break;}
    }
    
    int Y=y*y;
    for(int p=1;;p++){
      if(e-Z-Y<p){x=p-1; break;}
    }
    cout<<x<<y<<z<<endl;
    
  }
  return 0;



Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: expected '}' at end of input
   26 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>

#define FOR(i,l,n) for(int (i)=(l);(i)<(n);(i)++)
#define REP(i,n) FOR(i,0,n)

#define MAX_Y 1000
#define MAX_Z 100
using namespace std;

int main(){
    long int x,y,z,e,m=1000000;
    while(cin>>e,e){
        FOR(y,1,MAX_Y+1){
            FOR(z,1,MAX_Z+1){
                x = e-pow(z,3)-pow(y,2);
                if(x>=0&&x+y+z<m)m=x+y+z;
            }
        }
        cout<<m<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'pow' was not declared in this scope
   15 |                 x = e-pow(z,3)-pow(y,2);
      |                       ^~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  int e,x,y,z;
  while (true){
    cin >> e;
    if (!e)
      break;
    x = 0;
    y = 0;
    z = 0;
    m = e;
    while(e>=z*z*z){
      e -= z*z*z;
      while(e>=y*y)
	y++;
      y--;
      e -= y*y;
      x = e;
      if (m>x+y+z)
	m = x+y+z;
      z++;
    }
    z--;
    cout << m << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'm' was not declared in this scope
   14 |     m = e;
      |     ^
Language: C++

#include<iostream>
#include<climits>
using namespace std;
	int main(){
		int e,m,p,q,r,min;
		while(cin>>e,e){
			min=INT_MAX;
			for(int z=0;z*z*z<=e;z++)
			for(int y=0;y*y<=e;y++){
				x=e-z*z*z-y*y;
				if(x+y+z<min)
				min=x+y+z;
			}
			cout<<min<<endl;
		}
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                                 x=e-z*z*z-y*y;
      |                                 ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int e;
	while (cin >> e,e)
	{
		int z=0;
		while ((z+1)*(z+1)*(z+1) < e) z++;
		e -= z*z*z;
		int y=0;
		while ((y+1)*(y+1) < e) y++;
		e -= y*y;
		while (x+1 < e) x++;
		
		cout << x+y+z << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'x' was not declared in this scope
   15 |                 while (x+1 < e) x++;
      |                        ^
a.cc:17:25: error: 'x' was not declared in this scope
   17 |                 cout << x+y+z << endl;
      |                         ^
Language: C++

#include<iostream>using namespace std;int x,y,z,e,b;main(){while(true){cin>>e;if(!e)break;int ans=e;for(z=0;z*z*z<=e;z++){for(y=0;y*y+z*z*z<=e;y++){b=e-(y*y+z*z*z);ans=min(ans,b+y+z);}}cout<<ans<<endl;}}

Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<iostream>using namespace std;int x,y,z,e,b;main(){while(true){cin>>e;if(!e)break;int ans=e;for(z=0;z*z*z<=e;z++){for(y=0;y*y+z*z*z<=e;y++){b=e-(y*y+z*z*z);ans=min(ans,b+y+z);}}cout<<ans<<endl;}}
      |                         ^~~~~~~~~
a.cc:1:9: fatal error: iostream>usin: No such file or directory
    1 | #include<iostream>using namespace std;int x,y,z,e,b;main(){while(true){cin>>e;if(!e)break;int ans=e;for(z=0;z*z*z<=e;z++){for(y=0;y*y+z*z*z<=e;y++){b=e-(y*y+z*z*z);ans=min(ans,b+y+z);}}cout<<ans<<endl;}}
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
int e;
while(cin >> e){
int ans = 1000000000;
for(int z=1;z*z*z<e;z++)
for(int y=1;y*y+z*z*z<e;y++)
ans = min(ans,(e-y*y*-z*z*z) + y  + z);
cout << ans << endl;
}

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

#include <cmath>

using namespace std;

int pw (int n, int p) {
  if (n == 0) return 0;
  if (p == 0) return 1;
  if (p == 1) return n;
  return n * pw(n, p-1);
}

int computeM (int e) {
  
  int ret = e;
  
  // zが最も自由度の小さい数なので、zから決定していく。

  for(int y = 0; y <= sqrt(e); y++) {
    for(int z = 0; z <= sqrt(e); z++) {
      int temp = pw(y, 2) + pw(z, 3);
      int x = e - temp;
      if (x < 0) x = 0;
      if (x + temp == e) ret = min(x + y + z, ret);
    }
  }
  

  return ret;
}

int main (void) {
  int e, m;

  while (1) {
    cin >> e; if (e == 0) break;
    m = computeM(e);
    cout << m << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:5: error: 'cin' was not declared in this scope
   35 |     cin >> e; if (e == 0) break;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cmath>
  +++ |+#include <iostream>
    2 | 
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << m << endl;
      |     ^~~~
a.cc:37:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:18: error: 'endl' was not declared in this scope
   37 |     cout << m << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cmath>
  +++ |+#include <ostream>
    2 |
Language: C++

#include <cstdio>
#include <cmath>

#define MAX 1000000

int main(void) {
	while(1) {
		int e, y, z, ans = MAX;

		scanf("%d", &e);
		if(!e) break;
		for(z = 0; z*z*z <= e; z++) {
			y = (int)sqrt((double)e - z*z*z);
			ans = min(ans, e - y*y - z*z*z + y + z);
		}
		printf("%d\n", ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |                         ans = min(ans, e - y*y - z*z*z + y + z);
      |                               ^~~
      |                               std::min
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <cstdio>
#include <cmath>
#include <algorithm>

#define MAX 1000000

int main(void) {
	while(1) {
		int e, y, z, ans = MAX;

		scanf("%d", &e);
		if(!e) break;
		for(z = 0; z*z*z <= e; z++) {
			y = (int)sqrt((double)e - z*z*z);
			ans = min(ans, e - y*y - z*z*z + y + z);
		}
		printf("%d\n", ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'min' was not declared in this scope; did you mean 'std::min'?
   15 |                         ans = min(ans, e - y*y - z*z*z + y + z);
      |                               ^~~
      |                               std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++


import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;

public class Main {

	int INF = 1 << 28;
	//long INF = 1L << 62;
	double EPS = 1e-10;

	void run() {
		Scanner sc = new Scanner(System.in);
		for (;;) {
			int e = sc.nextInt();
			if (e == 0) break;
			int min = INF;
			for (int z=0;z*z*z<=e;z++) for (int y=0;y*y<=e-z*z*z;y++) {
				int x = e - z*z*z - y*y;
				min = min(min, x+y+z);
//				debug(z, y, x);
			}
			System.out.println(min);
		}
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}

	public static void main(String[] args) {
		new Main().run();
	}
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import static java.util.Arrays.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import static java.util.Collections.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
Language: Java

public class Main { 
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();//nでデータの入力個数を決める
		int count = 0;
		for(int i=0;i<n;i++) {
			
			//発車時刻
			int h = sc.nextInt();
			int m = sc.nextInt();
			int s = sc.nextInt();
			//到着時刻
			int H = sc.nextInt();
			int M = sc.nextInt();
			int S = sc.nextInt();

			int a,b;//aは発車時間を秒に、bは到着時間を秒に変換
			a= h*60*60 + m*60 + s;
			b= H*60*60 + M*60 + S;

			if(b-a>60) count++;
			if(a>b) break;
			if(n==0) break;


		}
		System.out.println(count);
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java


import javax.tools.JavaCompiler.CompilationTask;
public class Main {
	
	class C implements Comparable<C> {
		int startH;
		int startM;
		int startS;
		int endH;
		int endM;
		int endS;
		
		public C(String start , String end){
			String [] input = start.split(":");
			startH = Integer.parseInt(input[0]);
			startM = Integer.parseInt(input[1]);
			startS = Integer.parseInt(input[2]);
			input = end.split(":");
			endH = Integer.parseInt(input[0]);
			endM = Integer.parseInt(input[1]);
			endS = Integer.parseInt(input[2]);
			
		}
		@Override
		public int compareTo(C arg0) {
			if(startH < arg0.startH){
				return -1;
			}
			if(startH > arg0.startH){
				return 1;
			}
			else{
				if(startM < arg0.startM){
					return -1;
				}
				if(startM > arg0.startM){
					return 1;
				}
				else{
					if(startS < arg0.startS){
						return -1;
					}
					if(startS > arg0.startS){
						return 1;
					}
				}
				
			}
			return 0;
		}
		@Override
		public String toString() {
			return "C [startH=" + startH + ", startM=" + startM + ", startS="
					+ startS + ", endH=" + endH + ", endM=" + endM + ", endS="
					+ endS + "]";
		}
		
		
	}
	public boolean comp(C start, C end){
		if(start.startH < end.endH){
			return true;
		}
		else if(start.endH > end.endH){
			return false;
		}
		else{
			if(start.startM < end.endM){
				return true;
			}
			else if(start.endM > end.endM){
				return false;
			}
			else{
				if(start.startS < end.endS){
					return true;
				}
				else if(start.endS > end.endS){
					return false;
				}
				else{
					return true;
				}
			}
		}
	}
	
	private void doIt(){
		Scanner sc = new Scanner(System.in);
		while(true){
			int n = sc.nextInt();
			if( n == 0){
				break;
			}
			C [] data = new C[n];
			for(int i= 0; i < n ; i++){
				data[i] = new C(sc.next(), sc.next());
			}
			Arrays.sort(data);
			
			int max = 1;
			for(int i=1; i < n; i++){
				int count = 1;
				for(int j=i-1; j >= 0; j--){
					if(comp(data[i], data[j])){
						count++;
					}	
				}
				max = Math.max(max, count);
			}
			System.out.println(max);
		}
		
	}
	
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}

}

Compiler output:
Main.java:89: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:89: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:99: error: cannot find symbol
			Arrays.sort(data);
			^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: C

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

using namespace std;

typedef pair<int, int> P;

int main() {
	int n;
	char d;
	while(cin>>n) {
		if(n == 0){
			break;
		}
		vector<P> t(n);
		int h[2],m[2],s[2];
		for(int i= 0;i < n;i++){
			cin >> h[0]>> d >> m[0] >> d >> s[0] >> h[1] >> d >>m[1]>> d >>s[1];
			t[i].first= h[0]*3600+m[0]*60+s[0];
			t[i].second= h[1]*3600+m[1]*60+s[0];
		}
		for (int i =n-1; i> 0; i--) {
			for (int j =0; j < i; j++){
				if (t[j].first > t[j+1].first) {
					swap(t[j], t[j+1]);
				} else if (t[j].first == t[j+1].first){
					if (t[j].second > t[j+1].second) {
						swap(t[j], t[j+1]);
					}
				}
			}
		}
		queue<P> t1;
		queue<int> t2;
		for (int i=0; i< n; i++) {
			t1.push(t[i]);
		}
		int train =0;
		P p = t1.front();
		t1.pop();
		t2.push(p.second);
		train++;
		for (int i= 1; i < n; i++){
			p = t1.front();
			t1.pop();
			if (!t2.empty() && t2.front() <= p.first) {
				t2.pop();
			} else {
				train++;
			}
			t2.push(p.second);
		}
		cout<<train << endl;
	}
	return 0;
}

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

#include <vector>
using namespace std;

int main(){
    vector< vector<int> > trains;
    int n,i,j,k,f,t,h,m,s,flg;
    while(1){
        scanf("%d",&n);
        if(!n){break;}
        for(i=0;i<n;i++){
            scanf("%d:%d:%d",&h,&m,&s);
            f=h*3600+m*60+s;
            scanf("%d:%d:%d",&h,&m,&s);
            t=h*3600+m*60+s;
            if(trains.empty()){
                vector<int> buf(86401,0);
                for(j=f;j<=t;j++){buf[i]=1;}
                trains.push_back(buf);
            }
            else{
                for(auto itr=trains.begin();itr!=trains.end();itr++){
                    flg=0;
                    for(j=f+1;j<t;j++){if((*itr)[j]){flg=1;break;}} 
                    if(!flg){
                        for(j=f;j<=t;j++){(*itr)[j]=1;}
                        break;
                    }
                }
                if(flg){
                    vector<int> buf(86401,0);
                    for(j=f;j<=t;j++){buf[j]=1;}
                    trains.push_back(buf);
                }
            }
        }
        printf("%lu\n",trains.size());
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d",&n);
      |         ^~~~~
a.cc:36:9: error: 'printf' was not declared in this scope
   36 |         printf("%lu\n",trains.size());
      |         ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <vector>
  +++ |+#include <cstdio>
    2 | using namespace std;
Language: C++

#include <vector>
#include <cstdio>
using namespace std;

int main(){
    vector< vector<int> > trains;
    vector<int> buf(86401,0);
    int n,h,m,s,bf,bt,i,j,add_f;
    while(1){
        scanf("%d",&n);
        if(!n){break;}
        for(i=0;i<n;i++){
            scanf("%d:%d:%d",&h,&m,&s);
            bf=h*3600+m*60+s;
            scanf("%d:%d:%d",&h,&m,&s);
            bt=h*3600+m*60+s;
            auto bs=buf.begin();
            if(trains.empty()){
                fill(bs+bf,bs+bt,1);
                trains.push_back(buf);
                fill(bs+bf,bs+bt,0);
            }
            else{
                add_f=1;
                for(auto it=trains.begin();it!=trains.end();it++){
                    auto p=(*it).begin();
                    int fn=count(p+bf,p+bt,1);
                    if(fn==0 || (*(p+bf)==1 && *(p+bt)==1 && fn==2)){
                        fill(p+bf,p+bt,1);
                        add_f=0;
                        break;
                    }
                }
                if(add_f){
                    fill(bs+bf,bs+bt,1);
                    trains.push_back(buf);
                    fill(bs+bf,bs+bt,0);
                }
            }
        }
        printf("%lu\n",trains.size());
        trains.clear();
        trains.shrink_to_fit();
    }
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: 'count' was not declared in this scope
   27 |                     int fn=count(p+bf,p+bt,1);
      |                            ^~~~~
Language: C++

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::Read;
#[allow(dead_code)]
fn getline() -> String {
    let mut ret = String::new();
    std::io::stdin().read_line(&mut ret).ok().unwrap();
    ret
}
fn get_word() -> String {
    let mut stdin = std::io::stdin();
    let mut u8b: [u8; 1] = [0];
    loop {
        let mut buf: Vec<u8> = Vec::with_capacity(16);
        loop {
            let res = stdin.read(&mut u8b);
            if res.unwrap_or(0) == 0 || u8b[0] <= b' ' {
                break;
            } else {
                buf.push(u8b[0]);
            }
        }
        if buf.len() >= 1 {
            let ret = String::from_utf8(buf).unwrap();
            return ret;
        }
    }
}

#[allow(dead_code)]
fn get<T: std::str::FromStr>() -> T { get_word().parse().ok().unwrap() }

fn to_time(v: Vec<u8>) -> usize {
    let h: usize = (10 * (v[0] - 48) + v[1] - 48).into();
    let m: usize = (10 * (v[3] - 48) + v[4] - 48).into();
    let s: usize = (10 * (v[6] - 48) + v[7] - 48).into();
    3600 * h + 60 * m + s
}

fn solve() {
    loop {
        let n = get();
        if n == 0 { break; }
        const T: usize = 86400;
        let mut imos = [0; T];
        for _ in 0 .. n {
            let a = to_time(get_word().bytes().collect::<Vec<_>>());
            let b = to_time(get_word().bytes().collect::<Vec<_>>());
            imos[a] += 1;
            imos[b] -= 1;
        }
        for i in 0 .. T - 1 {
            imos[i + 1] += imos[i];
        }
        let ma = imos.iter().max().unwrap();
        println!("{}", ma);
    }
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_imports)]
      |  ^
a.cc:3:2: error: invalid preprocessing directive #[
    3 | #[allow(unused_imports)]
      |  ^
a.cc:6:2: error: invalid preprocessing directive #[
    6 | #[allow(dead_code)]
      |  ^
a.cc:32:2: error: invalid preprocessing directive #[
   32 | #[allow(dead_code)]
      |  ^
a.cc:2:1: error: 'use' does not name a type
    2 | use std::cmp::*;
      | ^~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::collections::*;
      | ^~~
a.cc:5:1: error: 'use' does not name a type
    5 | use std::io::Read;
      | ^~~
a.cc:7:1: error: 'fn' does not name a type
    7 | fn getline() -> String {
      | ^~
a.cc:12:1: error: 'fn' does not name a type
   12 | fn get_word() -> String {
      | ^~
a.cc:33:1: error: 'fn' does not name a type
   33 | fn get<T: std::str::FromStr>() -> T { get_word().parse().ok().unwrap() }
      | ^~
a.cc:35:1: error: 'fn' does not name a type
   35 | fn to_time(v: Vec<u8>) -> usize {
      | ^~
a.cc:42:1: error: 'fn' does not name a type
   42 | fn solve() {
      | ^~
a.cc:62:1: error: 'fn' does not name a type
   62 | fn main() {
      | ^~
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostrean>
 
using namespace std;

int main(void){

  int n;
  int sum[3000];

  while(1){
        scanf("%d",&n);
        if(n==0)break;
        memset(sum,0,sizeof(sum));
        for(int i=0;i<n;i++){
            int h,m,s;
            scanf("%2d:%2d:%2d",&h,&m,&s);
            sum[h*60*60+m*60+s]++;
            scanf("%2d:%2d:%2d",&h,&m,&s);
            sum[h*60*60+m*60+s]--;
        }
        int res=sum[0];
        for(int i=0;i<=24*60*60;i++){
            sum[i+1]+=sum[i];
            res=max(res,sum[i+1]);
        }
        printf("%d\n",res);
    }
    return 0;
}



Compiler output:
a.cc:4:9: fatal error: iostrean: No such file or directory
    4 | #include<iostrean>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define rep(i,a,n) for(ll i=a;i<n;i++)
#define ALL(s) s.begin(),s.end()
#define P pair<ll,ll>
#define vl vector<ll>
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vvl vector<vector<ll>>
#define print(n) cout<<n<<endl
const int M=100010;
const int MOD=1000000007;
const int inf=1000000007;
const long long INF=1000000000000000007;
using ll=long long;
//int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};



int main(){
	int n;
	const int MAX=10010;
	while(1){
		int ans_1[MAX],ans_2[MAX],cnt=0,ans=0;
		cin>>n;
		if(n==0)break;
		string s;
		rep(i,0,n){
			cin>>s;
			ans_1[i]=(int)((s[0]-'0')*10+s[1]-'0')*3600+(int)((s[3]-'0')*10+s[4]-'0')*60+(int)((s[6]-'0')*10+s[7]-'0');
			cin>>s;
			ans_2[i]==(int)((s[0]-'0')*10+s[1]-'0')*3600+(int)((s[3]-'0')*10+s[4]-'0')*60+(int)((s[6]-'0')*10+s[7]-'0');
		}
		sort(ans_1,ans_1+n);
		sort(ans_2,ans_2+n);
		rep(i,0,90000)if(a[i]!=0)cnt+=a[i],ans=max(ans,cnt);
		print(ans);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:34: error: 'a' was not declared in this scope
   36 |                 rep(i,0,90000)if(a[i]!=0)cnt+=a[i],ans=max(ans,cnt);
      |                                  ^
Language: C++

#include<iostream>
#include<vector>
#include<cstring>
#include<map>
using namespace std;

const int VMAX = 5e4;
const int INF = 1e8;

struct edge { int to, cap, rev; };

vector<edge> G[VMAX];
bool used[VMAX];

void add_edge(int from, int to, int cap) {
  G[from].push_back((edge){to, cap, G[to].size()});
  G[to].push_back((edge){from, cap, G[from].size() - 1});
}

int dfs(int v, int t, int f) {
  if (v == t) return f;
  used[v] = true;

  for (int i = 0; i < G[v].size(); i++) {
    edge &e = G[v][i];
    if (!used[e.to] and e.cap > 0) {
      int d = dfs(e.to, t, min(f, e.cap));
      if (d > 0) {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}

int max_flow(int s, int t) {
  int flow = 0;

  while (true) {
    memset(used, 0, sizeof(used));
    int f = dfs(s, t, INF);
    if (f == 0) return flow;
    flow += f;
  }
}

int solve() {
}

int time2int(int h, int m, int s) {
  return 3600 * h + 60 * m + s;
}

int main() {
  int n;
  while (cin >> n and n) {
    pair<int,int> table[NMAX];
    REP(i, n) {
      
    }

    //

    cout << solve() << endl;
  }
}

Compiler output:
a.cc: In function 'void add_edge(int, int, int)':
a.cc:16:47: warning: narrowing conversion of 'G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing]
   16 |   G[from].push_back((edge){to, cap, G[to].size()});
      |                                     ~~~~~~~~~~^~
a.cc:17:52: warning: narrowing conversion of '(G[from].std::vector<edge>::size() - 1)' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing]
   17 |   G[to].push_back((edge){from, cap, G[from].size() - 1});
      |                                     ~~~~~~~~~~~~~~~^~~
a.cc: In function 'int solve()':
a.cc:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
   50 | }
      | ^
a.cc: In function 'int main()':
a.cc:59:25: error: 'NMAX' was not declared in this scope; did you mean 'VMAX'?
   59 |     pair<int,int> table[NMAX];
      |                         ^~~~
      |                         VMAX
a.cc:60:9: error: 'i' was not declared in this scope
   60 |     REP(i, n) {
      |         ^
a.cc:60:5: error: 'REP' was not declared in this scope
   60 |     REP(i, n) {
      |     ^~~
Language: C++

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

typedef pair<int,int> pii;

vector<pii>train;
const int H=60*60;
const int M=60;
const int S=1;
int unit[3]={H,M,S};

int getTime(string s){
  string tmp;
  int res=0;
  for(int i=0;i<3;i++){
    tmp=s.substr(3*i,2);
    int val=unit[i]*atoi(tmp.c_str());
    res+=val;
  }
  return res;
}

void makeEvent(string start,string arrival){
  int st=getTime(start);
  int at=getTime(arrival);
  train.push_back(make_pair(st,1));
  train.push_back(make_pair(at,0));
}

int main(){
  int n;
  while(cin>>n,n){
    for(int i=0;i<n;i++){
    string start,arrival;
    cin>>start>>arrival;
    makeEvent(start,arrival);
    }
    int ans=0,tmp=0;
    sort(train.begin(), train.end());
    for(pii i:train){
      if(i.second==1){
	tmp++;
      }else{
	tmp--;
      }
      ans=max(tmp,ans);
    }
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   41 |     sort(train.begin(), train.end());
      |     ^~~~
      |     short
Language: C++

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            n = input()
            if n == 0:
                break
            log = [0 for _ in xrange(24 * 60 * 60)]
            for i in range(n):
                dept, arr = raw_input().split()
                dept = dept.split(':')
                arr = arr.split(':')
                dept = 24 * 60 * int(dept[0]) + 60 * int(dept[1]) + int(dept[2])
                arr = 24 * 60 * int(arr[0]) + 60 * int(arr[1]) + int(arr[2])
                log[dept+1] += 1
                log[arr+1] -= 1
            for i in range(len(log)-1):
                log[i+1] += log[i]
            print max(log)
            
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #! /usr/bin/env python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:16:9: error: empty character constant
   16 |         '''
      |         ^~
a.cc:16:11: warning: missing terminating ' character
   16 |         '''
      |           ^
a.cc:16:11: error: missing terminating ' character
a.cc:18:9: error: empty character constant
   18 |         '''
      |         ^~
a.cc:18:11: warning: missing terminating ' character
   18 |         '''
      |           ^
a.cc:18:11: error: missing terminating ' character
a.cc:38:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   38 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:4:1: error: 'import' does not name a type
    4 | import os
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
#define P pair<int,int>//出発、到着

vector<P>ta;
bool used[11000];
init(string x,string y){
			int s,e;
	string a=x.substr(0,2),b=x.substr(3,2),c=x.substr(6,2);
	int aa=(a[0]-'0')*10+(a[1]-'0');
	int bb=(b[0]-'0')*10+(b[1]-'0');
	int cc=(c[0]-'0')*10+(c[1]-'0');
	s=aa*3600+bb*60+cc;
	 a=y.substr(0,2),b=y.substr(3,2),c=y.substr(6,2);
	 aa=(a[0]-'0')*10+(a[1]-'0');
	 bb=(b[0]-'0')*10+(b[1]-'0');
	cc=(c[0]-'0')*10+(c[1]-'0');
	e=aa*3600+bb*60+cc;
	P tmp=make_pair(s,e);
	ta.push_back(tmp);

}
bool ok(int n){
for(int i=0;i<n;i++)if(used[i]==0)return false;
return true;
}
int main(){
	int n;
	while(true){
	cin>>n;
	if(n==0)break;
	ta.clear();
for(int i=0;i<n;i++){
	string x,y;
	cin>>x>>y;
	init(x,y);
}
int ans=1;
fill(used,used+11000,false);
	//trueなら使ったってこと
	
	int now=0,j=0,b=9999999,next=0;
	while(ok(n)==false){
	//for(int i=0;i<n;i++)cout<<used[i]<<" ";cout<<endl;
	for(int i=0;i<n;i++){
	if(ta[i].first>=now&&used[i]==0&&b>ta[i].first){
	b=ta[i].second;
	j=i;
	}
	}
	
	next=ta[j].second;
	if(now!=next){
	now=next;
	used[j]=1;
	b=9999999;
	}
	else {
	ans++;
	now=0,next=0;
	b=9999999;
	}
}
	cout<<ans<<endl;
}
	return 0;
}

Compiler output:
a.cc:12:1: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
   12 | init(string x,string y){
      | ^~~~
a.cc: In function 'int init(std::string, std::string)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
   27 | }
      | ^
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>
 
using namespace std;
 
int main(){
  int N;
  while(cin >> N, N){
    //vector<PII> tms;
    int range[24*60*60+1];
    fill(range, range+24*60*60+1, 0);
    REP(i,N){
      int h[2], m[2], s[2];
      scanf("%2d:%2d:%2d", &h[0], &m[0], &s[0]);
      scanf("%2d:%2d:%2d", &h[1], &m[1], &s[1]);
      int st = h[0]*60*60+m[0]*60+s[0], et = h[1]*60*60+m[1]*60+s[1];
      ++range[st], --range[et];
    }
    //SORT(tms);
    int ans = 0, acc = 0;
    REP(i,24*60*60){
      acc += range[i];
      ans = max(ans, acc);
    }
    cout << ans << endl;
  }  
   
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: error: 'i' was not declared in this scope
   35 |     REP(i,N){
      |         ^
a.cc:35:5: error: 'REP' was not declared in this scope
   35 |     REP(i,N){
      |     ^~~
Language: C++

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

int solve(n){
  vector< pair<int,int> > tm;
  char ch1,ch2;
  int h,m,s;
  for(int i=0;i<n;i++){
    cin>>h>>ch1>>m>>ch2>>s;
    tm.push_back(make_pair(h*3600+m*60+s,1));
    cin>>h>>ch1>>m>>ch2>>s;
    tm.push_back(make_pair(h*3600+m*60+s,-1));
  }
  sort(tm.begin(),tm.end());
  int res=0;
  int co=0;
  for(int i=0;i<(int)tm.size();i++){
    co+=tm[i].second;
    res = max(co,res);
  }
  return res;
}
    
  

int main (){
  int n;
  while(cin>>n && n){
      cout<<solve(n)<<endl;
  }
  return 0;
}

Compiler output:
a.cc:3:10: fatal error: algorith: No such file or directory
    3 | #include <algorith>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int solve(int n){
  vector< pair<int,int> > tm;
  char ch1,ch2;
  int h,m,s;
  for(int i=0;i<n;i++){
    cin>>h>>ch1>>m>>ch2>>s;
    tm.push_back(make_pair(h*3600+m*60+s,1));
    cin>>h>>ch1>>m>>ch2>>s;
    tm.push_back(make_pair(h*3600+m*60+s,-1));
  }
  sort(tm.begin(),tm.end());
  int res=0;
  int co=0;
  for(int i=0;i<(int)tm.size();i++){
    co+=tm[i].second;
    res = max(co,res);
  }
  return res;
}
    
  

int main (){
  int n;
  while(cin>>n && n){
      cout<<solve(n)<<endl;
  }
  return 0;
}

Compiler output:
a.cc:3:10: fatal error: algorith: No such file or directory
    3 | #include <algorith>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main (){
  int n;
  vector< pair<int,int> > tm;
  while(cin>>n && n){
    tm.clear();
    char ch1,ch2;
    int h,m,s;
    for(int i=0;i<n;i++){
      cin>>h>>ch1>>m>>ch2>>s;
      tm.push_back(make_pair(h*3600+m*60+s,1));
      cin>>h>>ch1>>m>>ch2>>s;
      tm.push_back(make_pair(h*3600+m*60+s,-1));
    }
    sort(tm.begin(),tm.end());
    int ans=0;
    int co=0;
    for(int i=0;i<(int)tm.size();i++){
      co+=tm[i].second;
      ans = max(co,ans);
    }
    cout<<ans<<endl;
  }
  return 0;
}

Compiler output:
a.cc:3:10: fatal error: algorith: No such file or directory
    3 | #include <algorith>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
static const int N = 10000;
int Change(string);
struct data{
  int sh,sm,ss,eh,em,es;
  bool operator<(const data& right)const{
    if(eh!=right.eh) return eh<right.eh;
    if(em!=right.em) return em<right.em;
    if(es!=right.es) return es<right.es;
    if(sh!=right.sh) return sh<right.sh;
    if(sm!=right.sm) return sm<right.sm;
    return ss<right.ss;
  }
};
int main(){
  int n,cnt,check[N],ok,flag,Max,i,j;
  int comh,comm,coms;
  string start[N],end[N],sub;
  while(1){
    cin >> n;
    vector<data> V(n);
    cnt=0;
    if(n==0) break;
    for(i=0;i<n;i++){
      cin >> start[i] >> end[i];
      check[i]=-1;
      sub=start[i].substr(0,2);
    Max=0;
    for(i=0;i<n;i++){
      Max=max(Max,check[i]);
    }
    cout << Max+1 << endl;
  }
  return 0;
}
int Change(string sub){
  int ret=0,x=1,i;
  for(i=0;i<2;i++){
    ret=ret*x+(sub[i]-'0');
    x=10;
  }
  return ret;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: template argument 1 is invalid
   25 |     vector<data> V(n);
      |                ^
a.cc:25:16: error: template argument 2 is invalid
a.cc:40:23: error: a function-definition is not allowed here before '{' token
   40 | int Change(string sub){
      |                       ^
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
#define MOD 100000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const int INF=1e9;
int rec(int h,int m,int s){
      return h*3600+m*60+s;
}
ll cnt[60*60*24+1];
int main(){
      int n;
      while(cin>>n&&n){
            memset(cnt,0,sizeof(cnt));
            int h1,m1,s1,h2,m2,s2;
            REP(i,n){
                  scanf("%d:%d:%d %d:%d:%d",&h1,&m1,&s1,&h2,&m2,&s2);
                  cnt[rec(h1,m1,s1)]++;
                  cnt[rec(h2,m2,s2)+1]--;
            }
            int ans=0;
            REP(i,60*60*24+1){
                  if(i==0)continue;
                  ans=max(cnt[i],ans);
            }
            cout<<ans<<endl;
      }
}

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

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;

bool dabu(int a, int b,int a1,int b1){
	if (a1>=b)return 0;
	if (b1<=a)return 0;
	return 1;
}

int main(){
	int n;
	vector<vector<int>>jikoku(10000,vector<int>(2));
	while (cin >> n, n){
		int ans=1;
		int ans1 = 1;
		for (int i = 0; i < n; i++){
			int si, shu;
			int  si1, si2, si3, shu1, shu2, shu3;
			scanf_s("%d:%d:%d %d:%d:%d", &si1, &si2, &si3, &shu1, &shu2, &shu3);
			si = 3600 * si1 + 60 * si2 + si3;
			shu = 3600 * shu1 + 60 * shu2 + shu3;
			jikoku[i][0]=si;
			jikoku[i][1]=shu;
			if (i){
				ans = 1;
				for (int j=0; j < i; j++){
					ans += dabu(jikoku[j][0], jikoku[j][1], si, shu);
				}
			}
			ans1 = max(ans, ans1);
		}
		cout << ans1 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   23 |                         scanf_s("%d:%d:%d %d:%d:%d", &si1, &si2, &si3, &shu1, &shu2, &shu3);
      |                         ^~~~~~~
      |                         scanf
Language: C++

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;

bool dabu(int a, int b,int a1,int b1){
	if (a1>=b)return 0;
	if (b1<=a)return 0;
	return 1;
}

int main(){
	int n;
	vector<vector<int>>jikoku(10000,vector<int>(2));
	while (cin > > n, n){
		int ans=1;
		int ans1 = 1;
		for (int i = 0; i < n; i++){
			int si, shu;
			int  si1, si2, si3, shu1, shu2, shu3;
			scanf("%d:%d:%d %d:%d:%d", &si1, &si2, &si3, &shu1, &shu2, &shu3);
			si = 3600 * si1 + 60 * si2 + si3;
			shu = 3600 * shu1 + 60 * shu2 + shu3;
			jikoku[i][0]=si;
			jikoku[i][1]=shu;
			if (i){
				ans = 1;
				for (int j=0; j < i; j++){
					ans += dabu(jikoku[j][0], jikoku[j][1], si, shu);
				}
			}
			ans1 = max(ans, ans1);
		}
		cout << ans1 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected primary-expression before '>' token
   17 |         while (cin > > n, n){
      |                      ^
Language: C++

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

int main() {
	int n;
	while(cin >>n,n){
		vector<int> vat;
		vat.capacity(n);
		for(int i=0;i<n;i++){
			string lts,ats;		//leave_time_string,arrive_time_string
			cin >>lts>>ats;
		
			lts.erase(lts.begin()+2);
			lts.erase(lts.begin()+4);
			ats.erase(ats.begin()+2);
			ats.erase(ats.begin()+4);
			
			int lt = atoi(lts.data());	//leave_time
			int at = atoi(ats.data());	//arrive_time

			if(i==0){
				vat.push_back(at);
				continue;
			}
			for(int j=0;j<vat.size();j++){
				if(vat[j]<=lt){
					vat[j]=at;
					break;
				}
				if(j==vat.size()-1)	vat.push_back(at);
			}
		}
		cout << vat.size() << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: no matching function for call to 'std::vector<int>::capacity(int&)'
   11 |                 vat.capacity(n);
      |                 ~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h:1078:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::capacity() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
 1078 |       capacity() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1078:7: note:   candidate expects 0 arguments, 1 provided