#include <bits/stdc++.h> #include <sstream> using namespace std; int fn(int cur,int n,int res){ if(cur==n) return res+1; if(cur>n) return res; res++; return res + fn(cur*2,n,0)+fn(cur*2+1,n,0); } int main() { vector<vector<int>>nums;...