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: 2018212212125
In contest: 1269

#include<cstdio>
#include<cmath>
#include<cstring>
#include<map>
#include<set>
#include<vector>
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
const int maxn = 1010;
const int inf=0x3f3f3f3f;
typedef long long ll;
int n,m,k,t;
int x,y,z;
int a[maxn];
char b[maxn];
int main()
{
	while(scanf("%d %d",&n,&m)!=EOF)
	{
		memset(a,inf,sizeof a);
		while(m--)
		{
			scanf("%d",&x);
			if(x==2)
			{
				scanf("%d",&y);
				if(a[y]==inf)
					printf("UMR!!!\n");
				else
					printf("%d\n",a[y]);
			}
			else
			{
				scanf("%d %d",&y,&z);
				a[y]=z;
			}
		}
	}
	
}