注意在二分的时候要用
for(int i=3; i<=n; i+=2){ add(a[i], 1); add(a[i-1], 1); ...... }
而非
for(int i=2; i<=n; i+=2){ add(a[i], 1); add(a[i+1], 1); ...... }
hack: 序列长度为偶数的都可以