cpp template for TopCoder