Language: C++

#include <set>
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
    set<pair<int, int>> t;
    for(int i=0; i<2; i++){
        int N;
        cin >> N;
        while(N--){
            int h,m;
            cin >> h >> m;
            table.insert((h,m));
        }
    }
    for(auto&& i : t)
        printf("%d:%02d",i.first,i.second);
        if(i != *(t.end()-1))
            cout << " ";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'table' was not declared in this scope; did you mean 'mutable'?
   13 |             table.insert((h,m));
      |             ^~~~~
      |             mutable
a.cc:18:12: error: 'i' was not declared in this scope
   18 |         if(i != *(t.end()-1))
      |            ^
a.cc:18:26: error: no match for 'operator-' (operand types are 'std::set<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator'} and 'int')
   18 |         if(i != *(t.end()-1))
      |                   ~~~~~~~^~
      |                        |  |
      |                        |  int
      |                        std::set<std::pair<int, int> >::iterator {aka std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/set:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:18:27: note:   'std::set<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
   18 |         if(i != *(t.end()-1))
      |                           ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:18:27: note:   'std::set<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
   18 |         if(i != *(t.end()-1))
      |                           ^
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^