plus pku c++ codes and a R code