srm635 : cpp version