[Offer收割]编程练习赛46 register

Ended

Participants:142

Verdict:Accepted
Score:100 / 100
Submitted:2018-01-28 13:39:37

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<stdio.h>
#include<string.h>
using namespace std;
char s[1000100];
int maxx(int a,int b)
{
    return a>b?a:b;
}
int main()
{
    int a,e,i,ei,o,u;
    a=e=i=ei=o=u=0;
    scanf("%s",s);
    int ls=strlen(s);
    for(int j=0;j<ls;j++)
    {
        if(s[j]=='a')
        {
            a++;
//            i++;
        }
        else if(s[j]=='e')
        {
            e=maxx(a,e)+1;
        }
        else if(s[j]=='i')
        {
            i=maxx(i,a)+1;
            ei=maxx(e,ei)+1;
        }
        else if(s[j]=='o')
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX