You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
794 B
33 lines
794 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//输入+输出重定向
|
|
freopen("../1124.txt", "r", stdin);
|
|
|
|
string s;
|
|
cin >> s;
|
|
|
|
int m = INT32_MIN;
|
|
unordered_map<char, int> _map = {{'A', 1},
|
|
{'E', 1},
|
|
{'I', 1},
|
|
{'O', 1},
|
|
{'U', 1},
|
|
{'Y', 1}};
|
|
int start = 0;
|
|
for (int i = 0; i < s.size(); ++i) {
|
|
if (_map.count(s[i]) > 0) {
|
|
if (i - start > m) {
|
|
m = i - start ;
|
|
start = i;
|
|
}
|
|
}
|
|
}
|
|
cout << m-1<< endl;
|
|
//关闭文件
|
|
fclose(stdin);
|
|
return 0;
|
|
}
|