int comb(int n, int m){ return fac(m)/ (fac(n) * fac(m-n));} int fac(int n){ int result=1,i;for (i=1;i<=n;i++)result *= i;return result;}