A. A Healthy Breakfast

    传统题 1000ms 256MiB

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 SS, where the ii-th plate from the left is rice if SiS_i is R, miso soup if SiS_i is M, and salad if SiS_i is S.

Determine whether the plate of rice is to the left of the plate of miso soup.

Constraints

  • S3|S| \le 3
    • SS contains one R, one M, and one S.

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