View Code of Problem 83

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	map<int,int> op;
	int a,b;
	for(int i=0;i<n+m;i++){
		cin>>a>>b;
		op[a]=b;
	}
	for(auto i=op.begin();i!=op.end();i++){
		cout<<i->first<<" "<<i->second<<endl;
	}
} 

Double click to view unformatted code.


Back to problem 83