###这是对的
#include<bits/stdc++.h>
using namespace std;
#define max 100005
struct locker{
vector<int> num,k;
int s;
}locker1[max];
int main()
{
int n,q;
cin>>n>>q;
int a,i,j,k;
for(int h=0;h<q;h++){
cin>>a;
if(a==1){
cin>>i>>j>>k;
locker1[i].s++;
locker1[i].num.push_back(j);
locker1[i].k.push_back(k);
}
else{
cin>>i>>j;
for(int h=locker1[i].s-1;h>=0;h--){
if(locker1[i].num[h]==j){
cout<<locker1[i].k[h]<<endl;
break;
}
}
}
}
}
###这是错的
#include<bits/stdc++.h>
using namespace std;
#define max 100005
struct locker{
vector<int> num,k;
}locker1[max];
int main()
{
int n,q;
cin>>n>>q;
int a,i,j,k;
for(int h=0;h<q;h++){
cin>>a;
if(a==1){
cin>>i>>j>>k;
locker1[i].num.push_back(j);
locker1[i].k.push_back(k);
}
else{
cin>>i>>j;
for(int h=0;h<q;h++){
if(locker1[i].num[h]==j){
cout<<locker1[i].k[h]<<endl;
break;
}
}
}
}
}