#FW0000018. Gấu lại đuổi theo (Bear with me, again..)
Bài tập thuộc lộ trình
Mục lục đề ⌄
Gấu lại đuổi theo (Bear with me, again..)
Bear with me, again..
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
The start, home and intermediate islands are circular and their interiors do not overlap. The shortest swimming distance between two islands is the distance between their centers minus the sum of their radii, not less than zero. The two swimmers may rest at an intermediate island before the next swim. A single swimming segment must not exceed .
Larry and Ryan must move from the current circular island to their home island. Water gap length equals the center distance minus radii, floored at zero. Each swim may cover at most units before resting on another island. Decide reachability.
Input
, then circles for origin and home, then intermediate circles.
Output
Print exactly Larry and Ryan will escape! or Larry and Ryan will be eaten to death..
Subtasks
- Subtask 1 (40 points): ; ; ; ; .
- Subtask 2 (60 points): ; ; ; .
Examples
Input
1 1
0 0 1
0 3 1
0
Output
Larry and Ryan will escape!
Explanation
The water gap is mile and the allowed uninterrupted distance is , so the two can swim directly.