to solve some problems from online judge