#include #include //#include "cs49/Recursion.h" #define BIT(i,x) (((1<<(i)) & (x)) >> i) #define SETBIT(i,x) ((x) |= (1 << (i))) #define CLEARBIT(i,x) ((x) &= ~(1 << (i))) #define UNION(x,y) ((x) | (y)) // z belongs to the union of x,y if z belongs to // one of x and y (or both) // the z-th bit of x | y is set if and only if // the z-th bit of x is set or the z-th bit of y is set #define INTERSECTION(x,y) ((x) & (y)) #define ELEMENTOF(x,y) ((y) & (1U<> 60) printf("Warning: binomial coefficient too big\n"); return ans; } int nElements(int p, int m) // count the bits of p among the 0th to m-1st bit that are set // and return that number { int k, ans = 0; for(k=0;k