constexprintpct(intx){return__builtin_popcount(x);}constexprintbits(intx){return31-__builtin_clz(x);}// floor(log2(x))intbitOneCount(inti){intsum=0;while(i){sum+=i&1;i=i>>1;}returnsum;// entire function is same as //return pct(i)}vector<vector<int>>combinations(intnum,intneeded){vector<vector<int>>ans;F0R(i,pow(2,num)){if(bitOneCount(i)==needed){//dbg(bitset<12>(i));vector<int>x;intk=i;F0R(j,num){if(k&1){x.push_back(j);}k=k>>1;}ans.push_back(x);}}dbg(ans.size());returnans;}