Here\'s the code in R, and I want to rewrite in Rcpp.
n0=5 aa=1:n0 cnt=0 for (x in aa){ for (y in aa[-x]){ for (z in aa[-c(x,y)]){ cnt = cnt+1