add some templates
solve POJ1930
solve POJ3641