In this problem Your text to link here... i m getting memory limit exceeded error after submitting . I have solved this question in two other ways and may be in this i may get tle even after debugging this . But i m just curious that my map will be not be constructed of more than 10^5 key values ..than why mle ? please help. submitted codeYour text to link here...