I am using map STL (map<int,map<int,bool> > table)
to store every pair in my set of pairs ..such that
for every existing pair (x,y)
in my set of pair..table[x][y] = true
. I expected this to be comparatively faster than traversing the set and checking every pair. But results are totally different.
Is there any way to increase performance of map
.
total no of pairs in set N=3000
and -10^6<=(x,y)<=10^6