#include using namespace std; using ll = long long; map memo,vis; ll calc(ll ni){ if(vis[ni]++) return memo[ni]; vector use; for(int i = 0;i<=64;i++){ if(ni>>i&1) use.push_back(calc(i)); } sort(use.begin(),use.end()); int now = 0; for(int i = 0;i>n; vector a(n); for(int i = 0;i>a[i]; ll now = 0; for(int i = 0;i