solving artofprogrammingcontests book problmes!