Start: Jun, 05, 2019 13:00:00
2019春ACM通识课考试(第一场)
End: Jun, 05, 2019 16:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 27ms
Memory: 1712kB
Author: 2017212212292
In contest: 1269

#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{
	int n,q;
	int vc[110];
	while(cin>>n>>q)
	{
		memset(vc,-1,sizeof(vc));
		while(q--)
		{
			int t,a,b;
			cin>>t;
			if(t==1)
			{
				cin>>a>>b;
				vc[a]=b;
			}
			else
			{
				cin>>a;
				if(vc[a]!=-1)
					cout<<vc[a]<<endl;
				else
					cout<<"UMR!!!"<<endl;
			}

		}
	}
}