#include using namespace std; typedef long long ll; typedef pair p_ll; template void debug(T itr1, T itr2) { auto now = itr1; while(now=0; i--) #define popcount __builtin_popcount const ll LLINF = pow(2,61)-1; const ll INF = pow(2,30)-1; ll gcd(ll a, ll b) { if (a> N; vector result((N+1)/2); rep(i,(N+1)/2) result[i] = (i+1)*2; if (N!=1&&N%2==1) result[N/2] = result[N/2-1]; while (result[N/2]%2==0) result[N/2] /= 2; debug(all(result)); return 0; }