{"problem":{"name":"FT Robot","description":{"content":"A robot is put at the origin in a two-dimensional plane. Initially, the robot is facing in the positive $x$\\-axis direction. This robot will be given an instruction sequence $s$. $s$ consists of the f","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc087_b"},"statements":[{"statement_type":"Markdown","content":"A robot is put at the origin in a two-dimensional plane. Initially, the robot is facing in the positive $x$\\-axis direction.\nThis robot will be given an instruction sequence $s$. $s$ consists of the following two kinds of letters, and will be executed in order from front to back.\n\n*   `F` : Move in the current direction by distance $1$.\n*   `T` : Turn $90$ degrees, either clockwise or counterclockwise.\n\nThe objective of the robot is to be at coordinates $(x, y)$ after all the instructions are executed. Determine whether this objective is achievable.\n\n## Constraints\n\n*   $s$ consists of `F` and `T`.\n*   $1 \\leq |s| \\leq 8$ $000$\n*   $x$ and $y$ are integers.\n*   $|x|, |y| \\leq |s|$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$s$\n$x$ $y$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc087_b","tags":[],"sample_group":[["FTFFTFFF\n4 2","Yes\n\nThe objective can be achieved by, for example, turning counterclockwise in the first `T` and turning clockwise in the second `T`."],["FTFFTFFF\n-2 -2","Yes\n\nThe objective can be achieved by, for example, turning clockwise in the first `T` and turning clockwise in the second `T`."],["FF\n1 0","No"],["TF\n1 0","No"],["FFTTFF\n0 0","Yes\n\nThe objective can be achieved by, for example, turning counterclockwise in the first `T` and turning counterclockwise in the second `T`."],["TTTT\n1 0","No"]],"created_at":"2026-03-03 11:01:13"}}