cryzan @ 2024-10-25 17:11:42
#include<bits/stdc++.h>//万能头保佑AK!!!
#define gets(S) fgets(S,sizeof(S),stdin)
#define double long double
#define int long long
#define PII pair<int,int>
#define max_3(a,b,c) max(a,max(b,c))
#define max_4(a,b,c,d) max(a,max(b,max(c,d)))
#define lcm(M,N) M*N/__gcd(M,N)
#define gcd(M,N) __gcd(M,N)
#define dcout(M,N) cout<<fixed<<setprecision(M)<<N
#define len(M) strlen(M)//define保佑AK!!!
using namespace std;
int n,q;
map<int,int> mp[1000001];
inline bool up_cmp(int x,int y){
return x>y;
}
inline bool down_cmp(int x,int y){
return x<y;
}
signed main(){
ios::sync_with_stdio(false);//同步流保佑AK!!!
cin.tie(0);
//freopen(".in", "r", stdin);
//freopen(".out", "w", stdout);
cin>>n>>q;
while(q--){
int x; cin>>x;
if(x==1){
int i,j,k; cin>>i>>j>>k;
mp[i][j]=k;
}
if(x==2){
int i,j; cin>>i>>j;
cout<<mp[i][j]<<endl;
}
}
return 0;
}
by zxdjmq @ 2024-10-25 17:27:06
呃,但是这题正解不就是map吗
by zxdjmq @ 2024-10-25 17:29:50
@cryzan 而且2分钟前怎么有一个一模一样的帖子
by cryzan @ 2024-10-25 17:47:01
@zxdjmq 因为我们是一帮的
by cryzan @ 2024-10-25 17:47:28
@zxdjmq 建议卡常
by zxdjmq @ 2024-10-26 12:13:48
@cryzan 什么题都卡常只会害了你,要卡常请出门左拐Ynoi