Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>

using namespace std;

#define fst first
#define scd second
#define PB push_back
#define MP make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define omajinai ios::sync_with_stdio(false);cin.tie(0)
#define rep(i,x) for(int i=0;i<(int)(x);++i)
#define rep1(i,x) for(int i=1;i<=(int)(x);++i)

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

template<typename T>T& max(T&a,T&b){if(a>=b)return a;return b;}
template<typename T>T& min(T&a,T&b){if(a<b)return a;return b;}
template<typename T>bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<typename T>bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<typename T>T get(){T a;cin>>a;return a;}
template<typename T>T rev(T a){reverse(all(a));return a;}
template<typename T>vector<T>&sort(vector<T>&a){sort(all(a));return a;}

const int inf = 1e9;
const ll linf = 3e18;
const double eps = 1e-9;

string conv(int a, int b)
{
    stringstream ss;

    ss << a;
    ss << ":";
    if (b < 10) ss << 0;
    ss << b;
    return ss.str();
}

struct data {
    int v;
    string s;
    data(){}
    data(int v, string s):v(v),s(s){}
    bool operator<(data d) const  {
        return v < d.v;
    }
};

map<string, s> A;

signed main()
{
    int N; cin >> N;

    vector<data> vs;

    rep(i, N) {
        int a, b; cin >> a >> b;
        string res = conv(a, b);
        A[res] = true;
        vs.push_back(data(a * 100 + b, res));
    }

    int M; cin >> M;
    rep(i, M) {
        int a, b; cin >> a >> b;
        string res = conv(a, b);
        if (A.find(res) != A.end()) continue;
        vs.push_back(data(a * 100 + b, res));
    }

    sort(all(vs));

    rep(i, vs.size()) {
        if (i) cout << ' ';
        cout << vs[i].s;
    }
    cout << endl;
}

Compiler output:
a.cc:71:13: error: 's' was not declared in this scope
   71 | map<string, s> A;
      |             ^
a.cc:71:14: error: template argument 2 is invalid
   71 | map<string, s> A;
      |              ^
a.cc:71:14: error: template argument 4 is invalid
a.cc: In function 'int main()':
a.cc:77:16: error: template argument 1 is invalid
   77 |     vector<data> vs;
      |                ^
a.cc:77:16: error: template argument 2 is invalid
a.cc:82:10: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   82 |         A[res] = true;
      |          ^
a.cc:83:12: error: request for member 'push_back' in 'vs', which is of non-class type 'int'
   83 |         vs.push_back(data(a * 100 + b, res));
      |            ^~~~~~~~~
a.cc:83:22: error: reference to 'data' is ambiguous
   83 |         vs.push_back(data(a * 100 + b, res));
      |                      ^~~~
In file included from /usr/include/c++/14/string:53,
                 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:6:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:61:8: note:                 'struct data'
   61 | struct data {
      |        ^~~~
a.cc:90:15: error: request for member 'find' in 'A', which is of non-class type 'int'
   90 |         if (A.find(res) != A.end()) continue;
      |               ^~~~
a.cc:90:30: error: request for member 'end' in 'A', which is of non-class type 'int'
   90 |         if (A.find(res) != A.end()) continue;
      |                              ^~~
a.cc:91:12: error: request for member 'push_back' in 'vs', which is of non-class type 'int'
   91 |         vs.push_back(data(a * 100 + b, res));
      |            ^~~~~~~~~
a.cc:91:22: error: reference to 'data' is ambiguous
   91 |         vs.push_back(data(a * 100 + b, res));
      |                      ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:61:8: note:                 'struct data'
   61 | struct data {
      |        ^~~~
a.cc:25:18: error: request for member 'begin' in 'vs', which is of non-class type 'int'
   25 | #define all(a) a.begin(),a.end()
      |                  ^~~~~
a.cc:94:10: note: in expansion of macro 'all'
   94 |     sort(all(vs));
      |          ^~~
a.cc:25:28: error: request for member 'end' in 'vs', which is of non-class type 'int'
   25 | #define all(a) a.begin(),a.end()
      |                            ^~~
a.cc:94:10: note: in expansion of macro 'all'
   94 |     sort(all(vs));
      |          ^~~
a.cc:96:15: error: request for member 'size' in 'vs', which is of non-class type 'int'
   96 |     rep(i, vs.size()) {
      |               ^~~~
a.cc:28:38: note: in definition of macro 'rep'
   28 | #define rep(i,x) for(int i=0;i<(int)(x);++i)
      |                                      ^
a.cc:98:19: error: invalid types 'int[int]' for array subscript
   98 |         cout << vs[i].s;
      |                   ^