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