Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

unordered_map of pair and int

struct HASH{
  size_t operator()(const pair<int,int>&x)const{
    return hash<long long>()(((long long)x.first)^(((long long)x.second)<<32));
  }
};
unordered_map<pair<int,int>,int,HASH>mp;
//In Function pass it as

int foo(unordered_map<pair<int,int>,int,HASH> &mp);
Source by codeforces.com #
 
PREVIOUS NEXT
Tagged: #pair #int
ADD COMMENT
Topic
Name
8+3 =