sxjsxj @ 2023-10-16 22:01:45
#include<iostream>
using namespace std;
bool f;
int i,n,q,cnt=0,top,x1,y1,x[100001],y[100001];
long long z[100001];
main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
cin>>n>>q;
while(q--)
{
cin>>top>>x1>>y1;
if(top==1)
{
cnt++;
cin>>z[cnt];
x[cnt]=x1,y[cnt]=y1;
}
else
{
f=false;
for(i=1;i<=cnt;i++)
if(x[i]==x1 && y[i]==y1)
{
cout<<z[i]<<'\n';
f=true;
break;
}
if(!f)
cout<<"0\n";
}
}
}
by fengjia @ 2023-10-17 19:29:32
开vector 正常的存不下捏