Game Of Sticks REN2013I

ans[mask]=max(ans[mask],ans[mask^((1<<i)+(1<<j)+(1<<k))]+area(i,j,k));
i didn’t understand why we are using the mask and i don’t understand the masking could you explain .where should i learn this masking thing ??

//