ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1299. Псилонцы

I don't understand this sentence! How shall I decide whether the robot should turn left or right? And why LEFT in sample #1?
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 14 окт 2004 05:09
Note that it does not matter whether the robot is moving forward or backward while following the route. You should consider this when calculating the turn direction - the turn angle should be minimal.
Re: I don't understand this sentence! How shall I decide whether the robot should turn left or right? And why LEFT in sample #1?
Послано Michael Rybak (accepted@ukr.net) 11 фев 2006 04:32
This means that when you want to reach a point at angle A, you can either move FRONT at angle A, or move BACK at angle A + 180, so you must choose the one closer to your current direction.

That's why we have LEFT in first sample: -100 == 80, and 80 is closer to 0 than -100 is, so we turn LEFT to reach 80.

When they say "angle to the next waypoint exceeds 20 degrees by absolute value", they actually mean "angle or Abs(180 - Abs(Angle)) exceeds 20 degrees by absolute value".