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

#include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N:
for(int i=0;i<N;i++){
int k, p, u=0; cin >> k >> p;
while(k) {
k--;
u++;
if(u==p)u=0;
}
cout << u+1 << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: expected ';' before ':' token
    4 | int N; cin >> N:
      |                ^
      |                ;
a.cc:5:13: error: 'i' was not declared in this scope
    5 | for(int i=0;i<N;i++){
      |             ^
Language: C++

#include<stdio.h>
int main(void)
{
		int a[100],n,k,p,j,i;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d",&k,&p);
			if(k%p==0){
			a[i]=p;
			}
			else{
				a[i]=k%p;
				}
		}
	for(j=o;j<n;j++){
			printf("%d\n",a[j]);
			}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'o' was not declared in this scope
   15 |         for(j=o;j<n;j++){
      |               ^
Language: C++

#include <iostream>
using namespace std;

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

  for(int i=0,i<n,i++){
  int k,p;
  cin >> k >> p;

    if(k<p){
      cout << k << endl;
    }if(k%p==0){
      cout << p << endl;
    }if(k%p!=0){
      cout << k%p << endl;
    }

  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<' token
    8 |   for(int i=0,i<n,i++){
      |                ^
      |                ;
a.cc:8:16: error: expected primary-expression before '<' token
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0,i<n,i++){
      |                      ^
      |                      ;
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N,K,P;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>K>>P;
		cout<<K%p<<endl;
	}
	return 0;
}
			

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'p' was not declared in this scope
    8 |                 cout<<K%p<<endl;
      |                         ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N,K,P;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>K>>P;

		cout<<K%P<<endl;
	
	
		
	
	return 0;
}
			

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

#include<iostream>
using namespace std;

int main (){
	int N;
	int K[N];
	int P[N];
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>K[i]>>P[i];
	}
	for(int j=0;j<N;j++){
		cout<<K[i]%P[i]<<endl;
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'i' was not declared in this scope
   13 |                 cout<<K[i]%P[i]<<endl;
      |                         ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N;
	cin>>N;
	int K[N],P[n]
	for(int i=0;i<N;i++){
		cin>>K[i]>>P[i];
	}
	for(int j=0;j<N;j++){
		if(K>P){
			cout<<K[i]-K[i]/P[i]<<endl;
		else{
			cout<<P[i]%K[i]<<endl;
		}
	return 0;
}
			

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
    6 |         int K[N],P[n]
      |                    ^
a.cc:7:9: error: expected initializer before 'for'
    7 |         for(int i=0;i<N;i++){
      |         ^~~
a.cc:7:21: error: 'i' was not declared in this scope
    7 |         for(int i=0;i<N;i++){
      |                     ^
a.cc:11:22: error: 'P' was not declared in this scope
   11 |                 if(K>P){
      |                      ^
a.cc:13:17: error: expected '}' before 'else'
   13 |                 else{
      |                 ^~~~
a.cc:11:24: note: to match this '{'
   11 |                 if(K>P){
      |                        ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N;
	cin>>N;
	int K[N],P[n]
	for(int i=0;i<N;i++){
		cin>>K[i]>>P[i];
	}
	for(int j=0;j<N;j++){
		if(K>P){
			cout<<K[i]-K[i]/P[i]<<endl;
		}
		else{
			cout<<P[i]%K[i]<<endl;
		}
	}
	return 0;
}
			

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
    6 |         int K[N],P[n]
      |                    ^
a.cc:7:9: error: expected initializer before 'for'
    7 |         for(int i=0;i<N;i++){
      |         ^~~
a.cc:7:21: error: 'i' was not declared in this scope
    7 |         for(int i=0;i<N;i++){
      |                     ^
a.cc:11:22: error: 'P' was not declared in this scope
   11 |                 if(K>P){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int N,K,P,A;
	for(int i=0;i<N;i++){
	cin>>K>>P;
	A=K/P;
	if(A==0){
		A=P;
		cout<<A<<endl;
		}else{
		cout<<A<<endl;
	}
return 0;
}

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

#include <iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int k,p;
  cin >> k >> p >. endl;

  while((k-p)>0){
    k=k-p;
  }
  cout << k << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before '.' token
    8 |   cin >> k >> p >. endl;
      |                  ^
Language: C++

#include <iostream>
using namespace std;

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

  for(int i=0;i<n;i++){
    int k,p;
    cin >> k >> p >. endl;
    while((k-p)>0){
      k=k-p;
    }
    cout << k << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before '.' token
   10 |     cin >> k >> p >. endl;
      |                    ^
Language: C++

#include <
cstdio
>
int
main() {
int
n, k, p;
scanf
("%d", &n);
for (
int
i
=0; 
i
<n; ++
i
) {
scanf
("%d %d", &k, &p
);
int
j = 1;
while (
--
k) { 
//simulation
++j; 
if (j == p+1) j = 1;
}
printf
("%d
\
n", j
);
}
return 0;
}

Compiler output:
a.cc:1:11: error: missing terminating > character
    1 | #include <
      |           ^
a.cc:1:10: error: empty filename in #include
    1 | #include <
      |          ^
a.cc:31:2: warning: missing terminating " character
   31 | ("%d
      |  ^
a.cc:31:2: error: missing terminating " character
   31 | ("%d
      |  ^~~
a.cc:33:2: warning: missing terminating " character
   33 | n", j
      |  ^
a.cc:33:2: error: missing terminating " character
   33 | n", j
      |  ^~~~
a.cc:2:1: error: 'cstdio' does not name a type
    2 | cstdio
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N;
	cin>>N;
	for(int n=0;n<N;n++){
		int K,P;
		cin>>K>>P;
	if(K>P){
	if(K%P==0){
		cout<<P<<endl;
}
	else {
		cout<<K%P<<endl;
}
}
	if(K<P){
		cout<<K<<endl;
}
	return 0;
	}

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

#include <iostream>
using namespace std;
int main(){
	int N,K,P;
	cin>>N;
	for(int n=0;n<N;n++){
		
		cin>>K>>P;
	if(K>P){
	if(K%P==0){
		cout<<P<<endl;
}
	else {
		cout<<K%P<<endl;
}
}
	if(K<P){
		cout<<K<<endl;
}
	return 0;
	}

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

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

int main(){
	int a,N;
	cin>>N;
	int*K=new int[N];
	int*P=new int[N];
	int*X=new int[N];
	for(a=0;a<N;a++){
		cin>>K>>P;
		X[a]=K[a]%P[a];
		if(X[a]==0){
			X[a]=P[a];
		}	
	}
	for(a=0;a<N;a++){
		cin>>X[a]>>endl;
	}
	
		  
    return 0;
}

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

#include<stdio.h>
int main(void)
{
	int P, K, i, N,a[100];
	scanf_s("%d", &N);
	for (i = 0; i < N; i++) {
		scanf_s("%d%d", &K, &P);
		if (K < P) {
			a[i] = P;
		}
		else {
			if (K%P == 0) {
				a[i]=P;
			}
			else {
				a[i]=K%P;
			}
		}
	}
	for (i = 0; i < N; i++) {
		printf("%d\n", a[i]);
	}
	return 0;
}

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

//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
using namespace std;

int main() {
	int N,K,P;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>K>>P;
 	int j = 1;
	while (--k) {
	++j;
	if (j == p+1) j = 1;
	}
	cout<<j<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: 'k' was not declared in this scope
   22 |         while (--k) {
      |                  ^
a.cc:24:18: error: 'p' was not declared in this scope
   24 |         if (j == p+1) j = 1;
      |                  ^
Language: C++

//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
using namespace std;

int main() {
	int N,K,P;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>K>>P;
 	int j = 1;
	while (--k) {
		++j;
		if (j == p+1) j = 1;
	}
	cout<<j<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: 'k' was not declared in this scope
   22 |         while (--k) {
      |                  ^
a.cc:24:26: error: 'p' was not declared in this scope
   24 |                 if (j == p+1) j = 1;
      |                          ^
Language: C++

#include <stdio.h>
int main() {
int n, k, p, j;
sf("%d", &n);
for (int i=0; i<n; ++i) {
scanf("%d %d", &k, &p);
j = k%p;
printf("%d?\n", j == 0 ? p : j);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'sf' was not declared in this scope
    4 | sf("%d", &n);
      | ^~
Language: C++

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

int main(){
    int N;
    cin >>N;
    int k[N],p[N];
    cin k[N],p[N];
    for(int i =0;i<N;++i){
        cout << k[i]%p[i] <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before 'k'
    9 |     cin k[N],p[N];
      |        ^~
      |        ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int k1[n],k2[n];
    for(int i=0;i<n;i++){
        cin>>k1[i]>>k2[i];
        int ans=k1[i]%k2[i];
        if(ans==0){
            cout<<k2[i]<<endl;
        }
        else{
            cout<<ans<<endl;
        }
        return 0;
}

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

// nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include "stdafx.h"
using namespace std;

int winner(int A, int B) {
	while (1) {
		if (A > B) {
			A = A - B;
		}
		else {
			return A;
		}
	}
}
int main()
{
	int N = 0;//??\????????°
	int K[1000];//???????????°
	int P[1000];//????????°
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> K[i] >> P[i];
	}
	for (int i = 0; i < N; i++) {
		cout << winner(K[i], P[i])<<endl;
	}
    return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
using namespace std;

int winner(int A, int B) {
	while (1) {
		if (A > B) {
			A = A - B;
		}
		else {
			return A;
		}
	}
}
int main()
{
	int N = 0;//??\????????°
	int K[1000];//???????????°
	int P[1000];//????????°
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> K[i] >> P[i];
	}
	for (int i = 0; i < N; i++) {
		cout << winner(K[i], P[i])<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |         cin >> N;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | // nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
a.cc:25:17: error: 'cout' was not declared in this scope
   25 |                 cout << winner(K[i], P[i])<<endl;
      |                 ^~~~
a.cc:25:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:45: error: 'endl' was not declared in this scope
   25 |                 cout << winner(K[i], P[i])<<endl;
      |                                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | // nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n = 0;
	cin >> n;
	for(int i = 0; i < n; i++){
		int k, p;
		cin >> k >> p;
		if(k % p == 0){
			cout << p;
		}else{
			cout << k % p;
		}
		cout << endl;
	}
	retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'retrun' was not declared in this scope
   17 |         retrun 0;
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;
	cin>>N;
	int i,j;
	for(int i=0; i<N; i++){
		cin>>i>>j;
		if(i>j)
			cout<<i<<endl;
		else 
			cout<<j<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'N' was not declared in this scope
    7 |         cin>>N;
      |              ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;
	cin>>n;
	int i,j;
	for(int i=0; i<N; i++){
		cin>>i>>j;
		if(i>j)
			cout<<i<<endl;
		else 
			cout<<j<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'N' was not declared in this scope
    9 |         for(int i=0; i<N; i++){
      |                        ^
Language: C++


#include "stdafx.h"
#include <iostream>
using namespace std;


int main() {
	int N = 0;
	int K[10000], P[10000];
	cin >> N;
	for (int i = 0;i<N;i++) {
		cin >> K[i];
			P[i
			];
	}
	for (int i = 0;i<N;i++) {
		int ans = K[i]%P[i];
		if (ans == 0) {
			cout >> P[i]>> endl;
		}
		else {
			cout >> ans>> endl;
		}
	}



	return 0;
}

Compiler output:
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std; 

int main(){
	int N,K,P;

	cin>>N;
	for(int i=0;i<N;i++){
		int w;
		cin>>K>>P;
		w=K%P;
		if(K%P==0;)
			w=K;
		cout<<w<<endl;
	}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected primary-expression before ')' token
   12 |                 if(K%P==0;)
      |                           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,k,p,i;
  cin >> a;
  for(i=0;i<a;i++){
    cin >> k >> p;
    if(k % p = 0)
      cout << p << endl;
    else 
      cout << k % p << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: lvalue required as left operand of assignment
    9 |     if(k % p = 0)
      |        ~~^~~
Language: C++

#include <stdio.h>
  2
  3 int main(void)
  4 {
  5     int times;              // N
  6     int value[times];       // K
  7     int headCount[times];   // P
  8     int i;
  9
 10     // printf("???????????????????????°?????\????????????????????????");
 11     scanf("%d", &times);
 12
 13     for (i = 0; i < times; i++)
 14     {
 15         // printf("???????????°??¨?????°?????\????????????????????????");
 16         scanf("%d %d", &value[i], &headCount[i]);
 17     }
 18
 19     for (i = 0; i < times; i++)
 20     {
 21         if ((value[i] % headCount[i]) == 0)
 22         {
 23             printf("%d\n", headCount[i]);
 24         }
 25         else
 26         {
 27             printf("%d\n", value[i] % headCount[i]);
 28         }
 29     }
 30
 31     return 0;
 32 }

Compiler output:
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int k,p;
		cin>>k>>p;
		if(k%p!=0){
		   cout<<k%p<<endl;
		}
		else{
			cout<<p<<endl;   
	}
}		



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

#include <stdio.h>

int main(void) {
	int N, M;
	int i, j;
	int h[100];
	int m[100];
	int k[100];
	int g[100];
	int witch;
	
	scanf("%d", &N);
	for (i = 0; i < N; i++) 
		scanf("%d%d", &h[i], &m[i]);
	scanf("%d", &M);
	for (i = 0; i < M; i++)
		scanf("%d%d", &k[i], &g[i]);
	
	i = j = 0;
	while (!(i == N |&& j == M)) {
		if( i == N)
			witch = 1;
		else if ( j == N)
			witch = 0;
		else {
			if( h[i] == k[j]) {
				if( m[i] < g[j])
					witch = 0;
				else
					witch = 1;
			} else if( h[i] < k[j])
				witch = 0;
			if( h[i] > k[j])
				witch = 1;
			if( h[i] == k[j] && m[i] == g[j])
				witch = 2;
		}
		if( i != 0 || j != 0)
			printf(" ");
		switch(witch) {
			case 0:
				printf("%d:%02d", h[i], m[i]);
				i++;
				break;
			case 1:
				printf("%d:%02d", k[j], g[j]);
				j++;
				break;
			case 2:
				printf("%d:%02d", h[i], m[i]);
				i++;j++;
				break;
		}
	}
	printf("\n");
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:31: warning: comparison between pointer and integer
   20 |         while (!(i == N |&& j == M)) {
      |                               ^~
main.c:20:9: error: label 'j' used but not defined
   20 |         while (!(i == N |&& j == M)) {
      |         ^~~~~
Language: C

#include <stdio.h>

int main(void) {
	int N, M;
	int i, j;
	int h[100];
	int m[100];
	int k[100];
	int g[100];
	int witch;
	
	scanf("%d", &N);
	for (i = 0; i < N; i++) 
		scanf("%d%d", &h[i], &m[i]);
	scanf("%d", &M);
	for (i = 0; i < M; i++)
		scanf("%d%d", &k[i], &g[i]);
	
	i = j = 0;
	while (i != N || j != M)) {
		if( i == N)
			witch = 1;
		else if ( j == N)
			witch = 0;
		else {
			if( h[i] == k[j]) {
				if( m[i] < g[j])
					witch = 0;
				else
					witch = 1;
			} else if( h[i] < k[j])
				witch = 0;
			if( h[i] > k[j])
				witch = 1;
			if( h[i] == k[j] && m[j] == g[j])
				witch = 2;
		}
		if( i != 0 || j != 0)
			printf(" ");
		switch(witch) {
			case 0:
				printf("%d:%02d", h[i], m[i]);
				i++;
				break;
			case 1:
				printf("%d:%02d", k[j], g[j]);
				j++;
				break;
			case 2:
				printf("%d:%02d", h[i], m[i]);
				i++;j++;
				break;
		}
	}
	printf("\n");
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:33: error: expected statement before ')' token
   20 |         while (i != N || j != M)) {
      |                                 ^
Language: C

#include<stdio.h>
int main(void)
{
	int i,j,N,M,temp,m[200],h[200];
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d",&h[i],&m[i]);
	}
	scanf("%d",&M);
	for(j=i;j<M+i;j++){
		scanf("%d %d",&h[j],&m[j]);
	}
	for(i=M+N-1;i>0;i--){
		for(j=M+N-1;j>0;j--){
			if(h[j-1] > h[j]){
				temp = h[j-1];
				h[j-1] = h[j];
				h[j] = temp;
				temp = m[j-1];
				m[j-1] = m[j];
				m[j] = temp;
			}
			else if(h[j-1] == h[j] && m[j-1] >= m[j]){
					temp = m[j-1];
					m[j-1] = m[j];
					m[j] = temp;
			}
		}
	}
	for(i=0;i<M+N;i++){
		while(h[i]==h[i+1] && m[i]==m[i+1])
			i++;
		if(m[i] < 10)
			printf("%d:0%d ",h[i],m[i]);
		else
			printf("%d:%d ",h[i],m[i]);
	???
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:37:9: error: expected expression before '?' token
   37 |         ???
      |         ^
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
????????int M,N,d[201],i,j,h,m,a,k=0;
????????scanf("%d",&N);
????????for(i=0;i<N;i++){
????????????????scanf("%d %d",&h,&m);
????????????????????????d[k]=h*60+m;
????????????????????????k++;
????????}
????????scanf("%d",&M);
????????for(j=i+1;j<N+M+1;j++){
????????????????scanf("%d %d",&h,&m);
????????????????????????d[k]=h*60+m;
????????????????????????k++;
????????}
????????for(i=0;i<M+N;i++){
????????????????for(j=i+1;j<M+N;j++){
????????????????????????if(d[i]>d[j]){
????????????????????????????????a=d[i];
????????????????????????????????d[i]=d[j];
????????????????????????????????d[j]=a;
????????????????????????}
????????????????????????else if(d[i]==d[j])
????????????????????????????????d[j]=-99;
??
????????????????}
????????????????if(d[i]>=0){
????????????????printf("%d:%02d ",d[i]/60,d[i]%60);
????????}
????????}
????????printf("\n");
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
    4 | ????????int M,N,d[201],i,j,h,m,a,k=0;
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????scanf("%d",&N);
      | ^
main.c:5:21: error: 'N' undeclared (first use in this function)
    5 | ????????scanf("%d",&N);
      |                     ^
main.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:1: error: expected expression before '?' token
    6 | ????????for(i=0;i<N;i++){
      | ^
main.c:12:1: error: expected expression before '?' token
   12 | ????????for(j=i+1;j<N+M+1;j++){
      | ^
main.c:33:1: error: expected expression before '?' token
   33 | ????????return 0;
      | ^
Language: C


#include<cstdio>
#include<algorithm>

int main(){

	int nBus=0;
	int aBus[2*23*59];
	int n,h,m;
	for(int k=0;k<2;++k){
		scanf("%d",&n);
		for(int i=0;i<n;++i){
			scanf("%d %d", &h, &m);
			aBus[nBus+i]=h*100+m;
			}
		nBus+= n;
	}
	std::sort(aBus,aBus+nBus);
	nBus=std::unique(aBus,aBus+nBus)-aBus;
	for(int i=0;i<nBus;++i)
		printf("%d:%02d%c",aBus[i]/100,aBus[i]%100,(i+1)==nBus?'\n':' ');
	}

Compiler output:
main.c:2:9: fatal error: cstdio: No such file or directory
    2 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main()
{
	int N,M,sum, h[24], m[60],a,b;
	scanf_s("%d", &N);
	for (int i = 0; i < N; i++) {
		scanf_s("%d %d", &h[i], &m[i]);
	}
	scanf_s("%d", &M);
	sum = N + M;
	for (int i = N; i < sum; i++) {
		scanf_s("%d %d", &h[i], &m[i]);
	}
	for (int i = 0; i < sum; i++) {
		for (int j = i; j < sum; j++) {
			if (h[i] > h[j]) {
				a = h[i];
				h[i] = h[j];
				h[j] = a;
				b = m[i];
				m[i] = m[j];
				m[j] = b;
			}
			if (m[i] == m[j]) {
				if (m[i] > m[j]) {
					b= m[i];
					m[i] = m[j];
					m[j] = b;
				}
			}
		}
	}
	for (int i = 0; i < sum; i++) {
		printf("%d", h[i]);
		printf(":");
		if (m[i] < 10) {
			printf("0");
		}
		printf("%d\n", m[i]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>
int main(){
	int time,time2,a,b,e,f,i,N,M,h[500],m[500];
	scanf("%d",&N);
	
	for(a=0;a<N;a++){
		scanf("%d %d",&h[a],&m[a]);
	}
	
	scanf("%d",&M);
	
	for(b=0;b<M;b++){
		scanf("%d %d",&h[b+a],&m[b+a]);
	}
	
	for(e=0;e<N+M;e++){
		for(f=e+1;f<N+M;f++){
			if(h[e]>h[f]){
				i=h[e];
				h[e]=h[f];
				h[f]=i;
				i=m[e];
				m[e]=m[f];
				m[f]=i;
			}else if(h[e]==h[f]){
				if(m[e]>g[f]){
					i=m[e];
					m[e]=m[f];
					m[f]=i;
				}
			}
		}
	}
	
	for(e=0;e<N+M;e++){
		if(h[e]!=h[e-1]&&m[e]!=g[e-1]){
			if(e!=0){
				printf(" ");
			}
			printf("%d:%02d",h[e],m[e]);
		}
	}
	printf("\n");
	
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:41: error: 'g' undeclared (first use in this function)
   26 |                                 if(m[e]>g[f]){
      |                                         ^
main.c:26:41: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
using namespace std;
int main(void){
	int N,h[101]={0},m[101]={0};
	int M,k[101]={0},g[101]={0};
	int a=0,b=0,c=0,d=0,temp=0,s[202]={0};
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>h[i]>>m[i];
		s[i]+=h[i]*3600+m[i]*60;
	}
	cin>>M;
	for(int i=0;i<M;i++){
		cin>>k[i]>>g[i];
		s[i+N]+=k[i]*3600+g[i]*60;
	}
	for(int i=0;i<N+M;i++){
		for(int j=(N+M)-1;j>i;j--){
			if(s[j]<s[j-1]){
				temp=s[j];
				s[j]=s[j-1];
				s[j-1]=temp;
			}
		}
	}
	for(int i=0;i<N+M;i++){
		a=s[i]/3600;
		b=(s[i]%3600)/60;
		if(a==c&&b==d&&i>0){
		}
		else{
			if(b<10){
				cout<<a<<":0"<<b;
			}
			else{
				cout<<a<<":"<<b;
			}
			if(i<N+M-1){
				cout<<" ";
			}
			else{
				cout<<endl;
			}
		}
		c=a;
		d=b;
	}
	return 0;
}

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

#include<stdio.h>
int time[24][60];
int main()
{
	int i,j,h,m,f;
	for(i=0;i<2;i++){
		scanf("%d",&j);
		for(;j<0;j--){
			scanf("%d %d",&h,&m);
			time[h][m]=1;
			}
		}
		f=1;[
		for(j=0;j<60;j++){
		if(!f)printf(" ");
		else f=0;
		printf("%d:%02d",i,j);
		}
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: expected expression before '[' token
   13 |                 f=1;[
      |                     ^
main.c:20:18: error: expected ';' before '}' token
   20 |         return 0;
      |                  ^
      |                  ;
   21 | }
      | ~
Language: C

    int i, j;

    for(i = 0; i < n - 1; i++) {
        for(j = n - 1; j > i; j--) {
            if (a[j - 1] > a[j]) {
                int temp = a[j];
                a[j] = a[j - 1];
                a[j - 1] = temp;
            }
        }
    }
}

int main(void)
{

    int n, m, h, p, k, g, a[100], i, c, j;

    scanf("%d", &n);

    for(i = 0; i < n; i++) {
        scanf("%d %d", &h, &p);
        a[i] = h * 60 + p;
    }

    scanf("%d", &m);

    for(i = 0; i < m; i++) {
        scanf("%d %d", &k, &g);
        a[n + i] = k * 60 + g;
    }

    c = n + m;
    bsort(a, c);

    for(i = 0; i < c; i++) {
        if(a[i] == a[i + 1]) {
            for(j = 0; j < c; j++)
                a[i + j] = a[i + j + 1];
            c--;
        }
    }

    for(i = 0; i < c; i++) {
        printf("%d:%.2d", a[i] / 60, a[i] % 60);
        if(i != c - 1)
            printf(" ");
    }

    printf("\n");

    return 0;
}

Compiler output:
main.c:3:5: error: expected identifier or '(' before 'for'
    3 |     for(i = 0; i < n - 1; i++) {
      |     ^~~
main.c:3:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 |     for(i = 0; i < n - 1; i++) {
      |                  ^
main.c:3:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 |     for(i = 0; i < n - 1; i++) {
      |                            ^~
main.c:12:1: error: expected identifier or '(' before '}' token
   12 | }
      | ^
main.c: In function 'main':
main.c:19:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   19 |     scanf("%d", &n);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |     int i, j;
main.c:19:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   19 |     scanf("%d", &n);
      |     ^~~~~
main.c:19:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:34:5: error: implicit declaration of function 'bsort' [-Wimplicit-function-declaration]
   34 |     bsort(a, c);
      |     ^~~~~
main.c:45:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   45 |         printf("%d:%.2d", a[i] / 60, a[i] % 60);
      |         ^~~~~~
main.c:45:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:45:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:45:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:50:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   50 |     printf("\n");
      |     ^~~~~~
main.c:50:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

int main(){
    set<int> times;
    int n, h, m;
    cin >> n;
    while(n-- > 0){
        cin >> h >> m;
        times.inserts(60*h + m);
    }
    cin >> n;
    while(n-- > 0){
        cin >> h >> m;
        times.insert(60*h + m);
    }
    
    bool first = true;
    for(set<int>::iterator it = times.begin(); it != times.end(); it++){
        if(first)   first = false;
        else        printf(" ");
        
        int x = *it;
        int a = x / 60;
        int b = x - 60*a;
        
        printf("%d:%02d", a, b);
    }
    printf("\n");
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'class std::set<int>' has no member named 'inserts'; did you mean 'insert'?
   11 |         times.inserts(60*h + m);
      |               ^~~~~~~
      |               insert
Language: C++

#include "bits/stdc++.h"

using namespace std;
using ll = long long;
using ull = unsigned long long;

typedef pair<int, int>pi;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
typedef pair<P, P> PPP;

const ll MOD = 1e9 + 7;
const ll INF = 9e18;
const double DINF = 5e14;
const double eps = 1e-10;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };

#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second

int a, b, h, m;
map<int, P>mp;

int main() {
	cin >> a;
	for (int i = 0;i < a;i++) {
		cin >> h >> m;
		mp[h * 60 + m] = P(h, m);
	}
	cin >> b;
	for (int i = 0;i < b;i++) {
		cin >> h >> m;
		mp[h * 60 + m] = P(h, m);
	}
	for (auto u : mp) {
		string p = to_string(u.sc.sc);
		if (u.sc.sc < 10)p = "0" + p;
		if (i != a + b - 1)cout << u.sc.fr << ':' << p << ' ';
		else cout << u.sc.fr << ':' << p << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:21: error: 'i' was not declared in this scope
   42 |                 if (i != a + b - 1)cout << u.sc.fr << ':' << p << ' ';
      |                     ^
Language: C++

#include<stdio.h>

void bubbleSort(int dt[],int n)
{
    int i,j,temp;

    for(i=0;i<n-1;i++){
        for(j=n-1;j>i;j--){
            if(dt[j-1]>dt[j]){
               
                temp=dt[j];
                dt[j]=dt[j-1];
                dt[j-1]=temp;
                
            }
        }
   
    }
}



int main(){

int h;
int m;


int a[200];


int an,bn;

int i;



scanf("%d",&an);

for(i=0;i<an;i++){
scanf("%d",&h);
scanf("%d",&m);
a[i]=h*60+m;
	}

scanf("%d",&bn);

for(i=an;i<an+bn;i++){
scanf("%d",&h);
scanf("%d",&m);
a[i]=h*60+m;
	}

bubbleSort(a,an+bn);

for(i=0;i<an+bn-1;i++){
	if(a[i-1]!=a[i]){
printf("%d:%02d ",(a[i]-(a[i]%60))/60,a[i]%60);
}
	}
i=an+bn-1;
	
if(a[i-1]!=a[i]){
printf("%d:%02d",(a[i]-(a[i]%60))/60,a[i]%60);
}
printf("\n");


return 0;

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

#include <iostream>
#include <map>
#include <vector>

using namespace std;

int main(){
  std::vector< pair<int,int> > a;
  int N,h,m,M;
  pair<int,int> time;

  cin >> N;
  for(int i = 0; i < N ;i++){
    cin >> h >> m;
    time.first = h;
    time.second = m;
    a.push_back(time);
  } 
  cin >> M;
  for(int i = 0; i < M ;i++){
    cin >> h >> m;
    time.first = h;
    time.second = m;
    a.push_back(time);
  }
  std::sort(a.begin(),a.end());//昇順ソート
  //std::sort(&data[0],&data[5]);//上と同じ意味
  cout << a[0].first << ":" << a[0].second;
  for(int i = 1 ; i < a.size() ; i++){
    cout << " " << a[i].first << ":";
    if( a[i].second < 10 ) cout << "0";
    cout << a[i].second;
  }	
  cout << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   26 |   std::sort(a.begin(),a.end());//昇順ソート
      |        ^~~~
      |        qsort
Language: C++

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

typedef pair<int,int> P;

int main() {
  while (true) {
    vector<P> v;

    for (int i = 0; i < 2; i++) {
      int n;

      if (!(cin >> n)) return 0;

      while (n--) {
        int h, m;
        cin >> h >> m;
        v.push_back(P(h, m));
      }
    }

    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());

    for (int i = 0; i < v.size(); i++) {
      if (i != 0) cout << " ";
      printf("%d:%02d", v[i].first, v[i].second);
    }
    cout << endl;
  }
}

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

#include <iostream>
#include <stdlib.h>

int main() {
  sprintf("aaa");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    5 |   sprintf("aaa");
      |           ^~~~~
a.cc:5:10: error: too few arguments to function 'int sprintf(char*, const char*, ...)'
    5 |   sprintf("aaa");
      |   ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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,
                 from a.cc:1:
/usr/include/stdio.h:365:12: note: declared here
  365 | extern int sprintf (char *__restrict __s,
      |            ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N=0;
	int h[200];
	int m[200];
	int M=0;
	int k[200];
	int g[200];
	int L=0;
	cin>>N;
	int tem=0;
	int i=0;
	for(int i=0;i<N;i++){
		cin>>h[i]>>m[i];
	}
	
	cin>>M;
	for(int i=0;i<M;i++){
		cin>>k[i]>>g[i];
	}
	int A=N+M;
	for(int i=0;i<M;i++){
		h[N+i]=k[i];
		m[N+i]=g[i];
	}
	for(int i=0;i<A-1;i++){
		for(int q=i;q<A-1;q++){
			if(h[i]>h[q+1]){
				tem=h[i];
				h[i]=h[q+1];
				h[q+1]=tem;
				tem=m[i];
				m[i]=m[q+1];
				m[q+1]=tem;
			}
			if((h[i]==h[q+1])&&(m[i]==m[q+1])){
				h[q+1]=h[q+2];
				m[q+1]=m[q+2];
				A--;
				p--;
			}
		}
		for(int q=i;q<A-1;q++){
			if((h[i]==h[q+1])&&(m[i]>m[q+1])){
				tem=m[i];
				m[i]=m[q+1];
				m[q+1]=tem;
			}		
		}	
	}
	while(1){
		if(m[i]<10){
			cout<<h[i]<<":0"<<m[i];
		}
		else{
			cout<<h[i]<<":"<<m[i];
		}
		A--;
		i++;
		if(A==0){
			cout<<endl;
			break;
		}
		else{
			cout<<" ";
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:33: error: 'p' was not declared in this scope
   41 |                                 p--;
      |                                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N=0;
	int h[200];
	int m[200];
	int M=0;
	int k[200];
	int g[200];
	int L=0;
	cin>>N;
	int tem=0;
	int i=0;
	for(int i=0;i<N;i++){
		cin>>h[i]>>m[i];
	}
	
	cin>>M;
	for(int i=0;i<M;i++){
		cin>>k[i]>>g[i];
	}
	int A=N+M;
	for(int i=0;i<M;i++){
		h[N+i]=k[i];
		m[N+i]=g[i];
	}
	for(int i=0;i<A-1;i++){
		for(int q=i;q<A-1;q++){
			if(h[i]>h[q+1]){
				tem=h[i];
				h[i]=h[q+1];
				h[q+1]=tem;
				tem=m[i];
				m[i]=m[q+1];
				m[q+1]=tem;
			}
			if((h[i]==h[q+1])&&(m[i]==m[q+1])){
				h[q+1]=h[q+2];
				m[q+1]=m[q+2];
				A--;
				q--;
			}
		}
		for(int q=i;q<A-1;q++){
			if((h[i]==h[q+1])&&(m[i]=>m[q+1])){
				tem=m[i];
				m[i]=m[q+1];
				m[q+1]=tem;
			}		
		}	
	}
	while(1){
		if(m[i]<10){
			cout<<h[i]<<":0"<<m[i];
		}
		else{
			cout<<h[i]<<":"<<m[i];
		}
		A--;
		i++;
		if(A==0){
			cout<<endl;
			break;
		}
		else{
			cout<<" ";
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:50: error: expected primary-expression before '>' token
   45 |                         if((h[i]==h[q+1])&&(m[i]=>m[q+1])){
      |                                                  ^
Language: C++

#include<iostream>
using namespace std;

struct time{
	int h,m;
};

int main(){
	int n,m;
	time tmp1[100],tmp2[100];

	cin >> n;
	for(int i=0;i<n;i++)
		cin >> tmp1[i].h >> tmp1[i].m;

	tmp1[n].h=25;	
	
	cin >> m;
	for(int i=0;i<m;i++)
		cin >> tmp2[i].h >> tmp2[i].m;

	tmp2[m].h=25;	
	
	time ans[200];
	int cnt1=0,cnt2=0;
	
	for(int i=0;i<n+m;i++){
		if(tmp1[cnt1].h<tmp2[cnt2].h){
			ans[i]=tmp1[cnt1];
			cnt1++;
		}
		else if(tmp1[cnt1].h==tmp2[cnt2].h){
			if(tmp1[cnt1].m<tmp2[cnt2].m){
				ans[i]=tmp1[cnt1];
				cnt1++;
			}
			else if(tmp1[cnt1].m==tmp2[cnt2].m){
				ans[i]=tmp2[cnt2];
				cnt2++;
				cnt1++;
				n--;
			}
			else{
				ans[i]=tmp2[cnt2];
				cnt2++;
			}
		}
		else{
			ans[i]=tmp2[cnt2];
			cnt2++;
		}
	}
	
	for(int i=0;i<n+m;i++){
		if(ans[i].m<10)
			cout << ans[i].h << ":0" << ans[i].m << ' ';
		else
			cout << ans[i].h << ':' << ans[i].m << ' ';
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before 'tmp1'
   10 |         time tmp1[100],tmp2[100];
      |             ^~~~~
      |             ;
a.cc:14:24: error: 'tmp1' was not declared in this scope; did you mean 'tm'?
   14 |                 cin >> tmp1[i].h >> tmp1[i].m;
      |                        ^~~~
      |                        tm
a.cc:16:9: error: 'tmp1' was not declared in this scope; did you mean 'tm'?
   16 |         tmp1[n].h=25;
      |         ^~~~
      |         tm
a.cc:20:24: error: 'tmp2' was not declared in this scope; did you mean 'tm'?
   20 |                 cin >> tmp2[i].h >> tmp2[i].m;
      |                        ^~~~
      |                        tm
a.cc:22:9: error: 'tmp2' was not declared in this scope; did you mean 'tm'?
   22 |         tmp2[m].h=25;
      |         ^~~~
      |         tm
a.cc:24:13: error: expected ';' before 'ans'
   24 |         time ans[200];
      |             ^~~~
      |             ;
a.cc:29:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |                         ans[i]=tmp1[cnt1];
      |                         ^~~
      |                         abs
a.cc:34:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |                                 ans[i]=tmp1[cnt1];
      |                                 ^~~
      |                                 abs
a.cc:38:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |                                 ans[i]=tmp2[cnt2];
      |                                 ^~~
      |                                 abs
a.cc:44:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   44 |                                 ans[i]=tmp2[cnt2];
      |                                 ^~~
      |                                 abs
a.cc:49:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |                         ans[i]=tmp2[cnt2];
      |                         ^~~
      |                         abs
a.cc:55:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |                 if(ans[i].m<10)
      |                    ^~~
      |                    abs
Language: C++

#include<set>
#include<iostream>
int main(){
int i=2,N,h,m;set<pair<int, int>> t;
while(i--&&std::cin>>N)while(N--&&std::cin>>h>>m)t.insert(make_pair(h,m));
for(auto i=t.begin();i!=t.end();)printf("%d:%02d",i->first,i->second),std::cout<<(++i!=t.end()?" ":"");
cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'set' was not declared in this scope
    4 | int i=2,N,h,m;set<pair<int, int>> t;
      |               ^~~
a.cc:4:15: note: suggested alternatives:
In file included from /usr/include/c++/14/set:63,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:96:11: note:   'std::set'
   96 |     class set
      |           ^~~
/usr/include/c++/14/set:87:13: note:   'std::pmr::set'
   87 |       using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
      |             ^~~
a.cc:4:19: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
    4 | int i=2,N,h,m;set<pair<int, int>> t;
      |                   ^~~~
      |                   std::pair
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/set:62:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: 'std::pair' declared here
   89 |     struct pair;
      |            ^~~~
a.cc:4:24: error: expected primary-expression before 'int'
    4 | int i=2,N,h,m;set<pair<int, int>> t;
      |                        ^~~
a.cc:5:50: error: 't' was not declared in this scope
    5 | while(i--&&std::cin>>N)while(N--&&std::cin>>h>>m)t.insert(make_pair(h,m));
      |                                                  ^
a.cc:5:59: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
    5 | while(i--&&std::cin>>N)while(N--&&std::cin>>h>>m)t.insert(make_pair(h,m));
      |                                                           ^~~~~~~~~
      |                                                           std::make_pair
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:6:12: error: 't' was not declared in this scope
    6 | for(auto i=t.begin();i!=t.end();)printf("%d:%02d",i->first,i->second),std::cout<<(++i!=t.end()?" ":"");
      |            ^
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout<<endl;
      | ^~~~
      | std::cout
In file included from a.cc:2:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:7: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 | cout<<endl;
      |       ^~~~
      |       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,m,a[100],b[100],c[100],d[100];
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i]>>b[i];
        cin>>m;
        for(int p=0;p<m;p++){
            cin>>c[i]>>d[i];
            if(a[i]*60+b[i]==c[p]*60+d[p])
                cout<<a[i]<<":"<<b[i]<<" ";
            else
                if(a[i]*60+b[i]>c[p]*60+d[p])
                cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" ";
                else
                    cout<<c[p]<<":"<<d[p}<<" "<<a[i]<<":"<<b[i]<<" ";
                }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:59: error: expected ']' before '}' token
   15 |                 cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" ";
      |                                                           ^
      |                                                           ]
a.cc:15:59: error: expected ';' before '}' token
   15 |                 cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" ";
      |                                                           ^
      |                                                           ;
a.cc:15:60: error: expected primary-expression before '<<' token
   15 |                 cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" ";
      |                                                            ^~
a.cc:16:17: error: 'else' without a previous 'if'
   16 |                 else
      |                 ^~~~
a.cc:17:29: error: 'p' was not declared in this scope
   17 |                     cout<<c[p]<<":"<<d[p}<<" "<<a[i]<<":"<<b[i]<<" ";
      |                             ^
a.cc:17:41: error: expected ']' before '}' token
   17 |                     cout<<c[p]<<":"<<d[p}<<" "<<a[i]<<":"<<b[i]<<" ";
      |                                         ^
      |                                         ]
a.cc:17:42: error: expected primary-expression before '<<' token
   17 |                     cout<<c[p]<<":"<<d[p}<<" "<<a[i]<<":"<<b[i]<<" ";
      |                                          ^~
a.cc:17:51: error: 'i' was not declared in this scope
   17 |                     cout<<c[p]<<":"<<d[p}<<" "<<a[i]<<":"<<b[i]<<" ";
      |                                                   ^
a.cc: At global scope:
a.cc:19:5: error: expected declaration before '}' token
   19 |     }
      |     ^
a.cc:20:5: error: expected unqualified-id before 'return'
   20 |     return 0;
      |     ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^