Preparando MOJI

HQ

2000ms 262144K

Description:

The famous joke programming language HQ9+ has only 4 commands. In this problem we will explore its subset — a language called HQ...

Input:

The only line of the input is a string between 1 and 106 characters long.

Output:

Output "Yes" or "No".

Sample Input:

HHHH

Sample Output:

Yes

Sample Input:

HQHQH

Sample Output:

No

Sample Input:

HHQHHQH

Sample Output:

No

Sample Input:

HHQQHHQQHH

Sample Output:

Yes

Note:

The rest of the problem statement was destroyed by a stray raccoon. We are terribly sorry for the inconvenience.

Informação

Codeforces

Provedor Codeforces

Código CF290E

Tags

*specialconstructive algorithms

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:43:06

Relacionados

Nada ainda