QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#125142#4965. Easy-to-Pronounce WordsAmys4nAC ✓1ms3480kbC++14861b2023-07-16 03:07:502023-07-16 03:07:54

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-16 03:07:54]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3480kb
  • [2023-07-16 03:07:50]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main() {
    string s;

    cin >> s;

    if(s.size()==1){
        cout << 1 << endl;
    } else {
        for(int i=0; i<s.size()-1; i++){
            if(s[i]=='a' or s[i]=='e' or s[i]=='i' or s[i]=='o' or s[i]=='u'){
                if(s[i+1]!='a' and s[i+1]!='e' and s[i+1]!='i' and s[i+1]!='o' and s[i+1]!='u'){
                    continue;
                } else{
                    cout << 0  << endl;
                    return 0;
                }
            } else {
                if(s[i+1]=='a' or s[i+1]=='e' or s[i+1]=='i' or s[i+1]=='o' or s[i+1]=='u'){
                    continue;
                } else{
                    cout << 0 << endl;
                    return 0;
                }
            }
        }
            cout << 1 << endl;

    }
}

詳細信息

Test #1:

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

input:

contest

output:

0

result:

ok single line: '0'

Test #2:

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

input:

coaches

output:

0

result:

ok single line: '0'

Test #3:

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

input:

cocahes

output:

1

result:

ok single line: '1'

Test #4:

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

input:

ali

output:

1

result:

ok single line: '1'

Test #5:

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

input:

a

output:

1

result:

ok single line: '1'

Test #6:

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

input:

b

output:

1

result:

ok single line: '1'

Test #7:

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

input:

c

output:

1

result:

ok single line: '1'

Test #8:

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

input:

d

output:

1

result:

ok single line: '1'

Test #9:

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

input:

e

output:

1

result:

ok single line: '1'

Test #10:

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

input:

f

output:

1

result:

ok single line: '1'

Test #11:

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

input:

g

output:

1

result:

ok single line: '1'

Test #12:

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

input:

h

output:

1

result:

ok single line: '1'

Test #13:

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

input:

i

output:

1

result:

ok single line: '1'

Test #14:

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

input:

j

output:

1

result:

ok single line: '1'

Test #15:

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

input:

k

output:

1

result:

ok single line: '1'

Test #16:

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

input:

l

output:

1

result:

ok single line: '1'

Test #17:

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

input:

m

output:

1

result:

ok single line: '1'

Test #18:

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

input:

n

output:

1

result:

ok single line: '1'

Test #19:

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

input:

o

output:

1

result:

ok single line: '1'

Test #20:

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

input:

p

output:

1

result:

ok single line: '1'

Test #21:

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

input:

q

output:

1

result:

ok single line: '1'

Test #22:

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

input:

r

output:

1

result:

ok single line: '1'

Test #23:

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

input:

s

output:

1

result:

ok single line: '1'

Test #24:

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

input:

t

output:

1

result:

ok single line: '1'

Test #25:

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

input:

u

output:

1

result:

ok single line: '1'

Test #26:

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

input:

v

output:

1

result:

ok single line: '1'

Test #27:

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

input:

w

output:

1

result:

ok single line: '1'

Test #28:

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

input:

x

output:

1

result:

ok single line: '1'

Test #29:

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

input:

y

output:

1

result:

ok single line: '1'

Test #30:

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

input:

z

output:

1

result:

ok single line: '1'

Test #31:

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

input:

ae

output:

0

result:

ok single line: '0'

Test #32:

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

input:

fg

output:

0

result:

ok single line: '0'

Test #33:

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

input:

abacadefagahijakalamanopaqaras

output:

1

result:

ok single line: '1'

Test #34:

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

input:

tuvawaxayaz

output:

1

result:

ok single line: '1'

Test #35:

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

input:

bababababababababababababababa

output:

1

result:

ok single line: '1'

Test #36:

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

input:

babababababababababababababab

output:

1

result:

ok single line: '1'

Test #37:

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

input:

ababababababababababababababab

output:

1

result:

ok single line: '1'

Test #38:

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

input:

ababababababababababababababa

output:

1

result:

ok single line: '1'

Test #39:

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

input:

ababababababababababababababaa

output:

0

result:

ok single line: '0'

Test #40:

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

input:

bba

output:

0

result:

ok single line: '0'

Test #41:

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

input:

abba

output:

0

result:

ok single line: '0'

Test #42:

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

input:

just

output:

0

result:

ok single line: '0'

Test #43:

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

input:

some

output:

1

result:

ok single line: '1'

Test #44:

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

input:

random

output:

0

result:

ok single line: '0'

Test #45:

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

input:

words

output:

0

result:

ok single line: '0'

Test #46:

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

input:

ok

output:

1

result:

ok single line: '1'

Test #47:

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

input:

done

output:

1

result:

ok single line: '1'

Test #48:

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

input:

lastinputline

output:

0

result:

ok single line: '0'