Hi , I was going through this problem on SPOJ (http://www.spoj.com/problems/NSTEPS/) , where I was basically trying to practice OOP concepts in c++ . You can see in my code (http://pastebin.com/qubfkgEr) that I defined a point object and also defined a comparing operator for it but when i was running the code on sample tests , find operator in map is not working properly or basically I should say that since I am a newbie to these advanced features of C++ , I am , may be not using comparator function properly . Can anyone help me out to sort this problem .??
If possible , Please also tell me how to tackle this problem in java if some time I encounter it there..