code for POJ/ACM