Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

PREVIOUS NEXT
Code Example
Cpp :: cpp sample code 
Cpp :: c++ delete directory 
Cpp :: check if intent has extras 
Cpp :: C++ system text format 
Cpp :: hello world in cpp 
Cpp :: how to initialized a 2d vector 
Cpp :: print hello world c++ 
Cpp :: c++ ros subscriber 
Cpp :: c++ min 
Cpp :: print array c++ 
Cpp :: constant pointer c++ 
Cpp :: c++ how to generate a random number in a range 
Cpp :: c++ nth substr 
Cpp :: cannot open include file unreal 
Cpp :: gestd::getline with wstring 
Cpp :: ostream was not declared in this scope 
Cpp :: std::tuple apply multiplier 
Cpp :: reverse an array using pointers in c++ 
Cpp :: dlopen failed: library "libomp.so" not found 
Cpp :: note++ 
Cpp :: c++ find sum of vector 
Cpp :: stack implementation using linked list in cpp 
Cpp :: string to int arduino 
Cpp :: print hello world on c++ 
Cpp :: integer type validation c++ 
Cpp :: c++ shared pointer 
Cpp :: how to do (binary) operator overloading in c++ 
Cpp :: c++ compare time 
Cpp :: lerp function c++ 
Cpp :: C++ Find the sum of first n Natural Numbers 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =