Search found 29 matches
- Mon Feb 16, 2004 6:36 pm
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 37228
- Fri Feb 13, 2004 5:34 pm
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 37228
- Fri Feb 13, 2004 5:33 pm
- Forum: Volume 1 (100-199)
- Topic: 103 - Stacking Boxes
- Replies: 200
- Views: 50276
- Wed Feb 11, 2004 5:16 pm
- Forum: Volume 1 (100-199)
- Topic: 105 - The Skyline Problem
- Replies: 160
- Views: 51312
- Tue Feb 03, 2004 1:51 am
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 37228
Yes this is a correct algorithm for this problem although you have to change it some. The biggest advice I've seen someone give for this problem is to calculate the profits after each exchange and save them in a 3 dimensional table. 2 of the dimensions for the exchange rates and the third dimension ...
- Sat Jan 31, 2004 7:07 pm
- Forum: General
- Topic: Test Case Generator and Answer
- Replies: 12
- Views: 4907
Plasdom: The program creates a random input and creates the solution to that input. I have not gone through and thought of tricky inputs as this takes a while for each problem and I have other things to do. If your program passes one set of inputs then just run the program again to get another set ...
- Tue Jan 27, 2004 6:49 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108633
- Tue Jan 27, 2004 4:59 am
- Forum: General
- Topic: Test Case Generator and Answer
- Replies: 12
- Views: 4907
About 25 lines of code and 10 minutes and here is test generator for 105.
http://people.eecs.ku.edu/~rucker/valladolid/p105.exe
Happy Coding!
http://people.eecs.ku.edu/~rucker/valladolid/p105.exe
Happy Coding!
- Mon Jan 26, 2004 6:45 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116567
You've got the right idea with the six different moves, but why not add the moves up with the different bins instead of subtracting from the sum each time. You save some time by eliminating several of your assignment operations sum_tmp=sum. like:
[cpp]
max[0]=bin[1]+bin[2]+bin[3]+bin[4]+bin[6]+bin ...
[cpp]
max[0]=bin[1]+bin[2]+bin[3]+bin[4]+bin[6]+bin ...
- Sun Jan 25, 2004 4:22 am
- Forum: General
- Topic: Test Case Generator and Answer
- Replies: 12
- Views: 4907
here is the test case generator for problem 104
http://people.eecs.ku.edu/~rucker/valladolid/p104.exe
happy coding.
http://people.eecs.ku.edu/~rucker/valladolid/p104.exe
happy coding.
- Sat Jan 24, 2004 7:26 pm
- Forum: Volume 1 (100-199)
- Topic: 103 - Stacking Boxes
- Replies: 200
- Views: 50276
- Sat Jan 24, 2004 8:59 am
- Forum: Volume 1 (100-199)
- Topic: 105 - The Skyline Problem
- Replies: 160
- Views: 51312
- Sat Jan 24, 2004 12:49 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317862
NSI: It looks like you are using int64 for Rec() to calculate the cycle counts and what not, but you only read in a and b as int I believe that int will hold values -32767 to 32765 or something like that. I can't remember exactly if pascal has unsigned int then this will only hold up to 65535 this ...
- Sat Jan 24, 2004 12:33 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108633
- Sat Jan 24, 2004 12:20 am
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 37228