#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) for(int i=0;i<(n);++i) #define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++) int main(int argc, char const *argv[]) { int c[101][101]={0}; REP(i,101) c[i][0]=c[i][i]=1; for(int i=2; i<=100; ++i){ for(int j=1; j>ch[i]; ll ans=1; ans*=ch['h'-'a']; ans*=ch['e'-'a']; ans*=ch['w'-'a']; ans*=ch['r'-'a']; ans*=ch['d'-'a']; //oはなるべく均等にわけて並べるのが良い ll o=ch['o'-'a']; ll o_p=(o/2)*(o-o/2); ans*=o_p; //lは2つ並んでるところになるべく集める ll l=ch['l'-'a']; ll l_p=0; for(ll i=2; i