import sequtils,strutils,algorithm var N = stdin.readline.parseInt A2 = stdin.readline.split.map(parseInt) flag : array[100001, bool] A2.sort(system.cmp) flag[0] = true var A = newSeq[int](0) for i,a in A2: if i == 0: A.add(a) continue if a != A2[i - 1]: A.add(a) var p,k : int ans : int block tansaku: for i in countdown(29, 0): var f : bool for j in 1..