A Healthy Breakfast
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
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.
- contains one
Input
The input is given from Standard Input in the following format:
S
Output
Print Yes if the plate of rice is to the left of the plate of miso soup, and No otherwise.
Sample
RSM
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.
SMR
No
The plates are arranged as salad, miso soup, and rice from left to right.
Programming exercise on 11 August
- 状态
- 已结束
- 规则
- IOI
- 题目
- 4
- 开始于
- 2024-8-11 16:30
- 结束于
- 2024-8-11 17:30
- 持续时间
- 1 小时
- 主持人
- 参赛人数
- 2