View Code of Problem 83

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int m,n;

    cin >> n >> m;
    pair <int ,int> a[m+n];
    //int k = m + n;
    for(int i = 0; i < m+n; i++){
        cin >> a[i].first >> a[i].second;
    }
     sort(a,a + m+n);
    for(int i = 0;i < m+n; ++i)
        cout<< a[i].first <<" "<<a[i].second<<endl;
}

Double click to view unformatted code.


Back to problem 83