加强数据!
查看原帖
加强数据!
620799
caohaoyu123楼主2024/10/25 17:09

请求加强数据,太水了,map硬过!!

#include<bits/stdc++.h>
using namespace std;
int n,q;
map<int,int>mp[100010];
int main()
{
    cin>>n>>q;
    while(q--)
    {
    	int x;
    	cin>>x;
    	if(x==1)
    	{
    		int u,v,w;
    		cin>>u>>v>>w;
    		mp[u][v]=w;
		}
		else
		{
			int u,v;
			cin>>u>>v;
			cout<<mp[u][v]<<endl;
		}
	}
	return 0;
}
2024/10/25 17:09
加载中...