Computer Science Canada A bit too wise for me.... |
Author: | riveryu [ Thu Jun 12, 2008 10:38 pm ] | ||
Post subject: | A bit too wise for me.... | ||
Can someone explain the tetris problem that used this concept?
|
Author: | DemonWasp [ Fri Jun 13, 2008 6:50 am ] |
Post subject: | RE:A bit too wise for me.... |
It looks like it may be trying to decide which is the best combination of files to write to a CD to maximise space usage. Note that they have N = 700 (MB on a CD?), files[] (sizes in MB?) and they "loop through every combination", checking each one to see if it's both less than N and better than their previous best. The usage of the for loop here is obfuscated, but it's essentially just iterating over all possible combinations. If you know bitwise stuff, you should be able to puzzle that out. I'm fairly certain this isn't even related to a tetris game implementation. |