cpp practise of lyy & yxr