QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#125141 | #4965. Easy-to-Pronounce Words | Amys4n | WA | 1ms | 3436kb | C++14 | 861b | 2023-07-16 03:06:56 | 2023-07-16 03:06:58 |
Judging History
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;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3436kb
input:
contest
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3368kb
input:
coaches
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3388kb
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: -100
Wrong Answer
time: 1ms
memory: 3400kb
input:
a
output:
0
result:
wrong answer 1st lines differ - expected: '1', found: '0'