acm-icpc-team slow solution