← 返回 meta 的题目列表Robot Bounded In Circle
类型:online_judge
On an infinite plane, a robot initially stands at (0, 0) and faces north. Given a sequence of instructions (e.g., 'G', 'L', 'R'), determine if the robot will be bounded in a circle after executing one cycle of the instructions, or it stays in a limit while executing the sequence repeatedly. The solution must be achieved with constant space.
Example
Input
G