//
模板
map< T,T > mp;
map< T,T >::iterator it;
it=mp.find(a);
if( it!=mp.end() ) it=mp.erase(it);
if( it!=mp.end() ) cout<<(*it).first<<' '<<(*it).second<<endl;
// eg.
#include<bits/stdc++.h>
using namespace std;
map<int,int> mp;
map<int,int>::iterator it;
int main()
{
int a,b,n,x;
while( ~scanf("%d%d",&a,&b) && a ) mp.insert( { a,b } );
scanf("%d",&n);
while( n-- )
{
scanf("%d",&x);
it=mp.find(x);
if( it!=mp.end() )
{
it=mp.erase(it); // it=
cout<<"size:"<<mp.size()<<endl; // size() 也随之变化
if( it!=mp.end() ) cout<<(*it).first<<' '<<(*it).second<<endl;
else cout<<"error!"<<endl;
}