okay, code works perfectly on my laptop(ubuntu) , but may i know why its showing wrong answer here. i tried to debug but couldn’t find any. anything wring in my logic?
http://www.codechef.com/viewsolution/1955275
lastly, THANK YOU SO MUCH! ![]()
okay, code works perfectly on my laptop(ubuntu) , but may i know why its showing wrong answer here. i tried to debug but couldn’t find any. anything wring in my logic?
http://www.codechef.com/viewsolution/1955275
lastly, THANK YOU SO MUCH! ![]()
http://www.codechef.com/viewsolution/1955303 here is solution link accepted(your code only just modified one character). when no answer is possible you have to print a tilde(~) not hyphen(-). That was the mistake you were doing.
OH my God! :’( Thank you so much! 
i banged my head for an hour thinking where i went wrong. thanks a ton. 
ur welcome
read the problem statement carefully 