ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1617. Flat Spots

Can I use DP to solve this problem??
Posted by windT 26 Jan 2009 18:12
And what's the easist way to solve this problem??
Caution, there is a solution discription here!
Posted by strider 27 Jan 2009 02:40
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