| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 41799 | jiabokai | 蚱蜢跳跃 | C++ | Accepted | 0 MS | 244 KB | 375 | 2024-02-23 11:47:33 |
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin,s); int min=-1,temp,last=0; bool flag=false; for(int i=0;i<s.size();i++){ if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'){ flag=true; temp=i-last; if(temp>min) min=temp; last=i; } } if(flag){ cout<<min; }else cout<<s.size()+1; return 0; }