There are N cars (numbered 1 through N) on a circular track with length .Foreachi(2<i<N), the i-th of them is at a distance i -- I clockwise from car 1,Le. car 1 needs to travel a distance 1 — 1 clockwise to reach car i. Also, for each valid i, the i-th car has f litres of gasoline in it initialy
You are driving car I in the clockwise direction. To move one unit of distance in this direction, you need to spend 1 litre of gasoline. When you pass another car (even if you'd run out of gasoline exactly at that point), you steal all its gasoline. Once you do not have any gasohne left, you stop.
What is the total clockwisedistance travelled by your car? write a c program
Answers
Answered by
0
Answer:
bajabajakab8wjwjjij
Similar questions