my code for hdu oj problems