1 << n <=> 2^n, where ^ means power of.
Since at least 20 years modern compilers will internally translate 2^n to this bitshift if supported by the CPU (nearly every CPU does support it).
int dp[1<<21]; is interesting because it addresses a really big array with at least sizeof(int) * (1 + 2^21) bytes.
@cire: Ok, you're right with the meaning of ^ in C++. But I've defined it to the power of. So in this context its quite right the power of. Your other statements I agree with you.