some common code reference for acmicpc