QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#125140#4965. Easy-to-Pronounce WordsAmys4nWA 1ms3444kbC++14851b2023-07-16 03:06:142023-07-16 03:06:16

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:06:16]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3444kb
  • [2023-07-16 03:06:14]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main() {
    string s;

    cin >> s;

    if(s.size()==1){
        cout << 0 << 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: 3444kb

input:

contest

output:

0

result:

ok single line: '0'

Test #2:

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

input:

coaches

output:

0

result:

ok single line: '0'

Test #3:

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

input:

cocahes

output:

1

result:

ok single line: '1'

Test #4:

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

input:

ali

output:

1

result:

ok single line: '1'

Test #5:

score: -100
Wrong Answer
time: 1ms
memory: 3368kb

input:

a

output:

0
1

result:

wrong answer 1st lines differ - expected: '1', found: '0'