codeforce 3rd question.... exceeding time limit.
added a test method to test the speed of our algo sans the reading part... this completes in 30millisecs.
THEN WHY THE FISH IT IS EXCEEDING TIME LIMIT.
finally accepted... shited to java 7.