only 1 testcase got passed rest all
are showing tle and is showing run error. plz check the code https://ide.codingblocks.com/s/259883
Facing tle problem
The range of each element of the array is upto 10^9. But u are allocation memory upto 10^7. Try to use inbuilt hashmap instead.
but how can i apply my hashing function using inbuilt hashmap
and it was giving segmentation fault on taking array of size 10^9
we have map<int,int> in c++