#include #include constexpr int max = 39; long long p[max]; // A364752 bool z[max+1]; // z[v] = is v present? void explore(int prev) { p[prev]++; for (int v = prev ? prev+1 : 1; v