Order of output is not in increasing(correct) order

I used unordered map to store the value of arrays. Should i use simple map to implement this problem ? please help?