state[j]&amp;＝mask[tc]