min path sum CPP accepted