for give sequence distinct nonnegative integer b_1 b_2 dot b_k determine good follow way consider graph k node number b_1 b_k write for 1 k find j 1 le j le k jneq b_i oplus b_j small j oplus denote operation bitwise XOR httpsenwikipediaorgwikiBitwise_operationXOR next draw undirected edge vertex number b_i b_j graph we sequence good result graph form tree connect do not simple cycle it possible number b_i b_j try add edge twice nevertheless add edge onceyou find example picture correspond test case Sequence 0 1 5 2 6 good reach 1 5however sequence 0 1 5 2 good you give sequence a_1 a_2 dots a_n distinct nonnegative integer you like remove element possibly remain sequence good what minimum possible number removal require achieve goalIt show sequence remove number element leave 2 remain sequence good