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: 6ms
Memory: 1716kB
Author: 2018212212161
In contest: 1269

#include<bits/stdc++.h>
#define ll long long 
using namespace std;

const int maxn=105;
const int inf=0x3f3f3f3f;

int p[maxn];

int main()
{
	int x,n,q,a,b;
	while(~scanf("%d%d",&n,&q))
	{
		memset(p,-1,sizeof p);
		for(int i=1;i<=q;i++)
		{
			scanf("%d %d",&x,&a);
			if(x==1)
			{
				scanf("%d",&b);
				p[a]=b;
			}
			else 
			{
				if(p[a]==-1)	printf("UMR!!!\n");
				else printf("%d\n",p[a]);
			}
		}
	}
}