#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 unsigned long xor128() { static unsigned long x=123456789, y=362436069, z=521288629, w=88675123; unsigned long t=(x^(x<<11)); x=y; y=z; z=w; return (w=(w^(w>>19))^(t^(t>>8))); } vector X,Y; int get(int x){ if((__builtin_popcount(x))%2==0)return 1; else return 0; } int get(){ int ret = 0; rep(i,X.size()){ for(int j=i+1;j>N>>M; rep(i,N)X.push_back(i+1); rep(_,1000){ int t = get(); if(t == M)Print(); if(t > M){ if(X.size()==0)break; int x = xor128()%X.size(); Y.push_back(X[x]); X.erase(X.begin() + x); } else{ if(Y.size()==0)break; int y = xor128()%Y.size(); X.push_back(Y[y]); Y.erase(Y.begin() + y); } } cout<<-1<