algorithm templates about the graph theory, the data structure and the geometry calculation