#abc360a. A - A Healthy Breakfast
A - A Healthy Breakfast
Score : points
问题陈述
高桥早餐吃了三盘菜:米饭、味噌汤和沙拉。
他的桌子又长又窄,所以他把三盘菜排成一行。排列由字符串 给出,其中从左边数第 盘菜是米饭如果 是 R
,味噌汤如果 是 M
,沙拉如果 是 S
。
确定米饭盘是否在味噌汤盘的左边。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
Takahashi eats three plates for breakfast: rice, miso soup, and salad.
His table is long and narrow, so he arranged the three plates in a row. The arrangement is given by a string , where the -th plate from the left is rice if is R
, miso soup if is M
, and salad if is S
.
Determine whether the plate of rice is to the left of the plate of miso soup.
Constraints
- contains one
R
, oneM
, and oneS
.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if the plate of rice is to the left of the plate of miso soup, and No
otherwise.
Sample Input 1
RSM
Sample Output 1
Yes
The plate of rice is at the 1st position from the left, and the plate of miso soup is at the 3rd position from the left. Since the plate of rice is to the left, print Yes
.
Sample Input 2
SMR
Sample Output 2
No
The plates are arranged as salad, miso soup, and rice from left to right.