2010 Asia Tianjin Regional Contest B Problem] [HDOJ 3622]