B3627 立方根

#include 
using namespace std;
map mp;
int main()
{
    int n,q;
    cin >> n >> q;
    long long op,a,b,c;
    for(int i = 1;i <= q;i++)
    {
        cin >> op >> a >> b;
        if(op == 1)
        {
            cin >> c;
            mp[a * int(1e5) + b] = c;
        }
        else
        {
            cout << mp[a * int(1e5) + b] << endl;
        }
    }
    return 0;
}

 

你可能感兴趣的:(洛谷题解,c++,洛谷)