some java code for ICPC problems