Search found 3 matches

by easton2048
Wed Jul 31, 2002 2:05 am
Forum: Volume 103 (10300-10399)
Topic: 10338 - Mischievous Children
Replies: 56
Views: 20626

Hello, I'm not too sure with Pascal data types ... but as far as I know it's maximum value is 2^31 ... I guess you will have problems there if the final answer is greater than 2^31 ... but still less than 2^32 ...

Regards,
LG
by easton2048
Sat Jul 27, 2002 9:26 am
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7958

My idea of this is using 2D approach instead of 1D array ... the first dimension is obviously the amount of change, and the 2nd dimension is the minimum-coin-index ... To calculate the number of ways, we can define a recursive function, say, getWays(): For instance, to count number of ways we can pr...
by easton2048
Sat Jul 27, 2002 9:00 am
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7958

IMO your formulation might be wrong there ... For instance, let's say you do bottom-up process like you described previously, ... you can't really tell if one element of your DP array is 'final' ... To clarify what I meant, your first loop (i = 1) will compute this: i = 1, cent = 5 -----------------...

Go to advanced search