QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#139405#4965. Easy-to-Pronounce WordsartcsAC ✓1ms3560kbC++17687b2023-08-13 12:35:392023-08-13 12:35:40

Judging History

你现在查看的是最新测评结果

  • [2023-08-13 12:35:40]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3560kb
  • [2023-08-13 12:35:39]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin>>s;

    int tam = s.size();

    bool band = true;

    for (int i=1; i<tam;i++)
    {
        if (s[i] == 'a'|| s[i] == 'e' || s[i] =='i' || s[i] == 'o' || s[i] == 'u')
        {
            if (s[i-1] =='a' || s[i-1] =='e' || s[i-1] =='i' || s[i-1] =='o' || s[i-1] =='u')
                band = false;
        }
        else
        {
            if (s[i-1] !='a' && s[i-1] !='e' && s[i-1] !='i' && s[i-1] !='o' && s[i-1] !='u')
                band = false;
        }
    }

    if (band)
        cout<<"1"<<endl;
    else
        cout<<"0"<<endl;


    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3380kb

input:

contest

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

coaches

output:

0

result:

ok single line: '0'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3496kb

input:

cocahes

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3448kb

input:

ali

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3440kb

input:

a

output:

1

result:

ok single line: '1'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

b

output:

1

result:

ok single line: '1'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3440kb

input:

c

output:

1

result:

ok single line: '1'

Test #8:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

d

output:

1

result:

ok single line: '1'

Test #9:

score: 0
Accepted
time: 1ms
memory: 3448kb

input:

e

output:

1

result:

ok single line: '1'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

f

output:

1

result:

ok single line: '1'

Test #11:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

g

output:

1

result:

ok single line: '1'

Test #12:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

h

output:

1

result:

ok single line: '1'

Test #13:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

i

output:

1

result:

ok single line: '1'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3448kb

input:

j

output:

1

result:

ok single line: '1'

Test #15:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

k

output:

1

result:

ok single line: '1'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

l

output:

1

result:

ok single line: '1'

Test #17:

score: 0
Accepted
time: 1ms
memory: 3492kb

input:

m

output:

1

result:

ok single line: '1'

Test #18:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

n

output:

1

result:

ok single line: '1'

Test #19:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

o

output:

1

result:

ok single line: '1'

Test #20:

score: 0
Accepted
time: 1ms
memory: 3440kb

input:

p

output:

1

result:

ok single line: '1'

Test #21:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

q

output:

1

result:

ok single line: '1'

Test #22:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

r

output:

1

result:

ok single line: '1'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3432kb

input:

s

output:

1

result:

ok single line: '1'

Test #24:

score: 0
Accepted
time: 1ms
memory: 3496kb

input:

t

output:

1

result:

ok single line: '1'

Test #25:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

u

output:

1

result:

ok single line: '1'

Test #26:

score: 0
Accepted
time: 1ms
memory: 3492kb

input:

v

output:

1

result:

ok single line: '1'

Test #27:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

w

output:

1

result:

ok single line: '1'

Test #28:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

x

output:

1

result:

ok single line: '1'

Test #29:

score: 0
Accepted
time: 0ms
memory: 3384kb

input:

y

output:

1

result:

ok single line: '1'

Test #30:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

z

output:

1

result:

ok single line: '1'

Test #31:

score: 0
Accepted
time: 0ms
memory: 3432kb

input:

ae

output:

0

result:

ok single line: '0'

Test #32:

score: 0
Accepted
time: 1ms
memory: 3492kb

input:

fg

output:

0

result:

ok single line: '0'

Test #33:

score: 0
Accepted
time: 0ms
memory: 3384kb

input:

abacadefagahijakalamanopaqaras

output:

1

result:

ok single line: '1'

Test #34:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

tuvawaxayaz

output:

1

result:

ok single line: '1'

Test #35:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

bababababababababababababababa

output:

1

result:

ok single line: '1'

Test #36:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

babababababababababababababab

output:

1

result:

ok single line: '1'

Test #37:

score: 0
Accepted
time: 0ms
memory: 3436kb

input:

ababababababababababababababab

output:

1

result:

ok single line: '1'

Test #38:

score: 0
Accepted
time: 1ms
memory: 3476kb

input:

ababababababababababababababa

output:

1

result:

ok single line: '1'

Test #39:

score: 0
Accepted
time: 1ms
memory: 3440kb

input:

ababababababababababababababaa

output:

0

result:

ok single line: '0'

Test #40:

score: 0
Accepted
time: 1ms
memory: 3444kb

input:

bba

output:

0

result:

ok single line: '0'

Test #41:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

abba

output:

0

result:

ok single line: '0'

Test #42:

score: 0
Accepted
time: 1ms
memory: 3432kb

input:

just

output:

0

result:

ok single line: '0'

Test #43:

score: 0
Accepted
time: 1ms
memory: 3520kb

input:

some

output:

1

result:

ok single line: '1'

Test #44:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

random

output:

0

result:

ok single line: '0'

Test #45:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

words

output:

0

result:

ok single line: '0'

Test #46:

score: 0
Accepted
time: 1ms
memory: 3444kb

input:

ok

output:

1

result:

ok single line: '1'

Test #47:

score: 0
Accepted
time: 1ms
memory: 3384kb

input:

done

output:

1

result:

ok single line: '1'

Test #48:

score: 0
Accepted
time: 0ms
memory: 3376kb

input:

lastinputline

output:

0

result:

ok single line: '0'