this is the homework of one of the class in SJTU