// *Partition Of Number* idea by K. M¹czyńska, // polished & cached by K. Bosak 1998-03-11 // use of 'long long' for Linux suggested by Z. Koza 1999-01-18 // kbosak@box43.pl // http://panoramix.ift.uni.wroc.pl/~bosy #include long long dynarray[406*406]={0}; long long partition(short int x, short int y) { long long *target=dynarray+x+406*y; if(*target) return *target; x-=y; if(x<0) { y+=x; x=0; } long long result=1; while(y>1) { result+=partition(x, y); x++; y--; } return *target=result; } int main() { for(short int x=1; x<406; x++) cout<