#pragma GCC target("avx2") #pragma GCC optimize("O3") a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i