|
|
вернуться в форумCan I use DP to solve this problem?? Послано windT 26 янв 2009 18:12 And what's the easist way to solve this problem?? Caution, there is a solution discription here! Ok. You have some (n) wheels pairs of 101 different diameters (600, 601, ... 699, 700 mm). First you should count all of them by diameter. For example, you've got 11 600-mm wheel pairs. How many cars can you equip with them? Only 2, because you use 4 wheel pairs for a car, and the rest 3 are useless. Then you proceed to 601-mm wheels. And so on. So i used 101-long array and the cycle for(n=0; n<=100; ++n) count += rr[n]/4; Edited by author 27.01.2009 02:42 |
|
|