| Contests - ACM Student Chapter - PSUT |
|---|
| Private |
| Spectator |
| the_seal vs Qusaioo |
|---|
| Finished |
This contest uses time limits scaling policy (depending on a programming language). The system automatically adjusts time limits by the following multipliers for some languages. Despite scaling (adjustment), the time limit cannot be more than 30 seconds. Read the details by the link.
Abu Shehab, a first-time train traveler and a man who'd spent his entire life in a village without so much as a donkey cart, found himself overwhelmed by the city's central train station and everywhere he looks, there's platforms.
To his LEFT, platforms are numbered from $$$a$$$ to $$$b$$$. To his RIGHT, they're $$$c$$$ to $$$d$$$. And STRAIGHT ahead, all of the other platforms exist.
Abu Shehab was trying to find his way back to Harat Al-Dab3, he's got his ticket with him and it says go to platform $$$e$$$, can you help Abu Shehab reach his platform.
The first line of the input contains an integer $$$T$$$ $$$(1 \le T \le 10^4)$$$ — denotes the number of testcases.
The second line of input contains 5 integers $$$a$$$ and $$$b$$$ $$$(1 \le a \lt b \le 10^5)$$$, $$$c$$$ and $$$d$$$ $$$(b + 1 \le c \lt d \le 10^5)$$$ and $$$e$$$ $$$(1 \le e \le 10^5)$$$ – such that $$$a$$$ and $$$b$$$ denotes the range that you find when you go left, $$$c$$$ and $$$d$$$ denotes the range you find when you go right, and $$$e$$$ denote your destination.
Print $$$T$$$ lines either LEFT if Abu Shehab has to go left, RIGHT if Abu Shehab has to go right, or GO if he has to go straight.
43 6 9 10 41 5 7 10 81 3 7 10 21 3 7 10 4
LEFT RIGHT LEFT GO
Abu Shehab in the train station.
| Name |
|---|

