Faded_wind123 @ 2024-05-19 20:40:51
#include<bits/stdc++.h>
using namespace std;
map<int,int> a[10003];
int main(){
int m,n;
cin>>m>>n;
while(n--){
int x,i,j,k;
cin>>x;
if(x==1){
cin>>i>>j>>k;
a[i][j]=k;
}else{
cin>>i>>j;
cout<<a[i][j]<<endl;
}
}
return 0;
}
by run_away @ 2024-05-19 21:03:09
@Faded_wind123 开太大炸了,可以在map里面再套一层map
by Faded_wind123 @ 2024-05-20 10:11:02
@run_away 大佬厉害,还可以这么搞确实没想到,果断关注一手