[FEEDBACK]If i am not wrong...I checked submission 34231 with uid 266.
This submission works under Java SDK 1.4.1 on my computer, but I am not sure whether it works under Java SDK 1.2.2.
I am quite sure that your algorithm is wrong, you should get a wrong answer feedback from OJ. Resubmit your program to the OJ and check what is the feedback.
now it 3 accept 3 wrong 4 memory -limit exceeded.