problem slove by cpp