Language: C++

// 0298
#include <iostream>
#include <vector>
using namespace std;

struct time{
	int h;
	int m;
};

void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){
	int i=0, j=0, check;
	while(i+j < bus1.size()+bus2.size()){
		if(i == bus1.size()){
			check = 2;
		}else if(j == bus2.size()){
			check = 1;
		}else if(bus1[i].h > bus2[j].h){
			check = 2;
		}else if(bus1[i].h < bus2[j].h){
			check = 1;
		}else{
			if(bus1[i].m > bus2[j].m)
				check = 2;
			else if(bus1[i].m < bus2[j].m)
				check = 1;
			else
				check = 0;
		}

		time t;
		if(check == 1){
			t.h = bus1[i].h;
			t.m = bus1[i].m;
			bus.push_back(t);
			i++;
		}else if(check == 2){
			t.h = bus2[j].h;
			t.m = bus2[j].m;
			bus.push_back(t);
			j++;
		}else if(check == 0){
			t.h = bus1[i].h;
			t.m = bus1[i].m;
			bus.push_back(t);
			i++;
			j++;
		}
	}
}

int main(){
	int N, M, hour, min;
	vector<time> bus1, bus2, bus;
	time t;

	cin>>N;
	for(int i=0;i<N;i++){
		cin>>hour>>min;
		t.h = hour;
		t.m = min;
		bus1.push_back(t);
	}

	cin>>M;
	for(int j=0;j<M;j++){
		cin>>hour>>min;
		t.h = hour;
		t.m = min;
		bus2.push_back(t);
	}

	merge(bus1, bus2, bus);

	for(int k=0;k<bus.size();k++){
		if(k != 0)
			cout<<" ";
		cout<<bus[k].h<<":";
		
		if(bus[k].m < 10)
			cout<<"0";
		cout<<bus[k].m;
	}
	cout<<endl;

	return 0;
}

Compiler output:
a.cc:11:23: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   11 | void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){
      |                       ^
a.cc:11:23: note:   expected a type, got 'time'
a.cc:11:23: error: template argument 2 is invalid
a.cc:11:42: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   11 | void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){
      |                                          ^
a.cc:11:42: note:   expected a type, got 'time'
a.cc:11:42: error: template argument 2 is invalid
a.cc:11:61: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   11 | void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){
      |                                                             ^
a.cc:11:61: note:   expected a type, got 'time'
a.cc:11:61: error: template argument 2 is invalid
a.cc: In function 'void merge(int, int, int&)':
a.cc:13:26: error: request for member 'size' in 'bus1', which is of non-class type 'int'
   13 |         while(i+j < bus1.size()+bus2.size()){
      |                          ^~~~
a.cc:13:38: error: request for member 'size' in 'bus2', which is of non-class type 'int'
   13 |         while(i+j < bus1.size()+bus2.size()){
      |                                      ^~~~
a.cc:14:30: error: request for member 'size' in 'bus1', which is of non-class type 'int'
   14 |                 if(i == bus1.size()){
      |                              ^~~~
a.cc:16:36: error: request for member 'size' in 'bus2', which is of non-class type 'int'
   16 |                 }else if(j == bus2.size()){
      |                                    ^~~~
a.cc:18:30: error: invalid types 'int[int]' for array subscript
   18 |                 }else if(bus1[i].h > bus2[j].h){
      |                              ^
a.cc:18:42: error: invalid types 'int[int]' for array subscript
   18 |                 }else if(bus1[i].h > bus2[j].h){
      |                                          ^
a.cc:20:30: error: invalid types 'int[int]' for array subscript
   20 |                 }else if(bus1[i].h < bus2[j].h){
      |                              ^
a.cc:20:42: error: invalid types 'int[int]' for array subscript
   20 |                 }else if(bus1[i].h < bus2[j].h){
      |                                          ^
a.cc:23:32: error: invalid types 'int[int]' for array subscript
   23 |                         if(bus1[i].m > bus2[j].m)
      |                                ^
a.cc:23:44: error: invalid types 'int[int]' for array subscript
   23 |                         if(bus1[i].m > bus2[j].m)
      |                                            ^
a.cc:25:37: error: invalid types 'int[int]' for array subscript
   25 |                         else if(bus1[i].m < bus2[j].m)
      |                                     ^
a.cc:25:49: error: invalid types 'int[int]' for array subscript
   25 |                         else if(bus1[i].m < bus2[j].m)
      |                                                 ^
a.cc:31:21: error: expected ';' before 't'
   31 |                 time t;
      |                     ^~
      |                     ;
a.cc:33:25: error: 't' was not declared in this scope
   33 |                         t.h = bus1[i].h;
      |                         ^
a.cc:33:35: error: invalid types 'int[int]' for array subscript
   33 |                         t.h = bus1[i].h;
      |                                   ^
a.cc:34:35: error: invalid types 'int[int]' for array subscript
   34 |                         t.m = bus1[i].m;
      |                                   ^
a.cc:35:29: error: request for member 'push_back' in 'bus', which is of non-class type 'int'
   35 |                         bus.push_back(t);
      |                             ^~~~~~~~~
a.cc:38:25: error: 't' was not declared in this scope
   38 |                         t.h = bus2[j].h;
      |                         ^
a.cc:38:35: error: invalid types 'int[int]' for array subscript
   38 |                         t.h = bus2[j].h;
      |                                   ^
a.cc:39:35: error: invalid types 'int[int]' for array subscript
   39 |                         t.m = bus2[j].m;
      |                                   ^
a.cc:40:29: error: request for member 'push_back' in 'bus', which is of non-class type 'int'
   40 |                         bus.push_back(t);
      |                             ^~~~~~~~~
a.cc:43:25: error: 't' was not declared in this scope
   43 |                         t.h = bus1[i].h;
      |                         ^
a.cc:43:35: error: invalid types 'int[int]' for array subscript
   43 |                         t.h = bus1[i].h;
      |                                   ^
a.cc:44:35: error: invalid types 'int[int]' for array subscript
   44 |                         t.m = bus1[i].m;
      |                                   ^
a.cc:45:29: error: request for member 'push_back' in 'bus', which is of non-class type 'int'
   45 |                         bus.push_back(t);
      |                             ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:54:20: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   54 |         vector<time> bus1, bus2, bus;
      |                    ^
a.cc:54:20: note:   expected a type, got 'time'
a.cc:54:20: error: template argument 2 is invalid
a.cc:55:13: error: expected ';' before 't'
   55 |         time t;
      |             ^~
      |             ;
a.cc:60:17: error: 't' was not declared in this scope
   60 |                 t.h = hour;
      |                 ^
a.cc:62:22: error: request for member 'push_back' in 'bus1', which is of non-class type 'int'
   62 |                 bus1.push_back(t);
      |                      ^~~~~~~~~
a.cc:68:17: error: 't' was not declared in this scope
   68 |                 t.h = hour;
      |                 ^
a.cc:70:22: error: request for member 'push_back' in 'bus2', which is of non-class type 'int'
   70 |                 bus2.push_back(t);
      |                      ^~~~~~~~~
a.cc:75:27: error: request for member 'size' in 'bus', which is of non-class type 'int'
   75 |         for(int k=0;k<bus.size();k++){
      |                           ^~~~
a.cc:78:26: error: invalid types 'int[int]' for array subscript
   78 |                 cout<<bus[k].h<<":";
      |                          ^
a.cc:80:23: error: invalid types 'int[int]' for array subscript
   80 |                 if(bus[k].m < 10)
      |                       ^
a.cc:82:26: error: invalid types 'int[int]' for array subscript
   82 |                 cout<<bus[k].m;
      |                          ^