Блог пользователя mohamedeltair

Автор mohamedeltair, история, 6 лет назад, По-английски

The problem I am referring to in this question is: Traffic Light

It is mentioned in the question that: "Formally, Mr. Ang can set the offsets for the traffic lights to OFFi so that for each traffic light, Mr. Ang can go through it in time range [OFFi + k × (Ai + Bi), OFFi + k × (Ai + Bi) + Ai) and must wait in time range [OFFi + k × (Ai + Bi) + Ai, OFFi + (k + 1) × (Ai + Bi)) for all integers k."

But I don't understand what the offsets actually mean here. If Mr. Ang is moving from his home at time 0 and offsets represent absolute time by which he can control the start of green light, so he can adjust the offsets to never wait at any traffic light, but this is not the case in the problem. Any help in understanding this is appreciated.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

For example if you consider the second sample test, he adjusted OFF1=0 and OFF2=25, so that in the worst case he has to wait only in the red of the first traffic light. Still I don't understand how is this related to the problem statement (specifically the equations part).