303798: CF733A. Grasshopper And the String

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Grasshopper And the String

题意翻译

## 题意描述 一天,有一只蚱蜢正在草地上跳跃,它发现了一张纸,上面有一个字符串。蚱蜢感兴趣的是,它所需要的最小的跳跃能力是多少,才能跳到纸的另一端,它只会跳到元音字母上(为'A','E','I','O','U','Y')。 形式上,蚱蜢从字符串的最左边一个字符的左侧开始跳,目标是跳到最右边一个字符的右侧。蚱蜢的跳跃能力的值就是它跳跃的距离。跳跃能力最小为 $1$ 。 ![](https://cdn.luogu.org/upload/vjudge_pic/CF733A/3d6ef82d52bf3bf3e745680bd25bf47489d98417.png) 如图,样例1中蚱蜢所需的最小跳跃能力为4。 ## 输入输出格式 ### 输入格式: 输入的第一行是由大写字母组成的一个字符串,保证该字符串不为空,字符串的长度不超过100。 ### 输出格式: 输出一个整数 $a$ ,为蚱蜢在这张纸条上所需的最小跳跃能力。 Translated by @dblark

题目描述

One day, the Grasshopper was jumping on the lawn and found a piece of paper with a string. Grasshopper became interested what is the minimum jump ability he should have in order to be able to reach the far end of the string, jumping only on vowels of the English alphabet. Jump ability is the maximum possible length of his jump. Formally, consider that at the begginning the Grasshopper is located directly in front of the leftmost character of the string. His goal is to reach the position right after the rightmost character of the string. In one jump the Grasshopper could jump to the right any distance from $ 1 $ to the value of his jump ability. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF733A/3d6ef82d52bf3bf3e745680bd25bf47489d98417.png)The picture corresponds to the first example.The following letters are vowels: 'A', 'E', 'I', 'O', 'U' and 'Y'.

输入输出格式

输入格式


The first line contains non-empty string consisting of capital English letters. It is guaranteed that the length of the string does not exceed 100.

输出格式


Print single integer $ a $ — the minimum jump ability of the Grasshopper (in the number of symbols) that is needed to overcome the given string, jumping only on vowels.

输入输出样例

输入样例 #1

ABABBBACFEYUKOTT

输出样例 #1

4

输入样例 #2

AAA

输出样例 #2

1

Input

题意翻译

## 题意描述 一天,有一只蚱蜢正在草地上跳跃,它发现了一张纸,上面有一个字符串。蚱蜢感兴趣的是,它所需要的最小的跳跃能力是多少,才能跳到纸的另一端,它只会跳到元音字母上(为'A','E','I','O','U','Y')。 形式上,蚱蜢从字符串的最左边一个字符的左侧开始跳,目标是跳到最右边一个字符的右侧。蚱蜢的跳跃能力的值就是它跳跃的距离。跳跃能力最小为 $1$ 。 ![](https://cdn.luogu.org/upload/vjudge_pic/CF733A/3d6ef82d52bf3bf3e745680bd25bf47489d98417.png) 如图,样例1中蚱蜢所需的最小跳跃能力为4。 ## 输入输出格式 ### 输入格式: 输入的第一行是由大写字母组成的一个字符串,保证该字符串不为空,字符串的长度不超过100。 ### 输出格式: 输出一个整数 $a$ ,为蚱蜢在这张纸条上所需的最小跳跃能力。 Translated by @dblark

加入题单

上一题 下一题 算法标签: