QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#142576 | #4965. Easy-to-Pronounce Words | JJCT_1 | AC ✓ | 1ms | 3576kb | C++14 | 661b | 2023-08-19 12:37:05 | 2023-08-19 12:37:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve(){
string aux;
cin>>aux;
vector<int> todo;
for(int i=1;i<aux.size();i++){
if(aux[i]=='a' || aux[i]=='e' || aux[i]=='i' || aux[i]=='o' || aux[i]=='u'){
if(aux[i-1]=='a' || aux[i-1]=='e' || aux[i-1]=='i' || aux[i-1]=='o' || aux[i-1]=='u'){
cout<<"0\n";
return;
}
}else{
if(aux[i-1]=='a' || aux[i-1]=='e' || aux[i-1]=='i' || aux[i-1]=='o' || aux[i-1]=='u'){
}else{
cout<<"0\n";
return;
}
}
}
cout<<"1\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
//cin >> t;
while(t--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3572kb
input:
contest
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
coaches
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
cocahes
output:
1
result:
ok single line: '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
ali
output:
1
result:
ok single line: '1'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
a
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
b
output:
1
result:
ok single line: '1'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
c
output:
1
result:
ok single line: '1'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3448kb
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: 3448kb
input:
f
output:
1
result:
ok single line: '1'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
g
output:
1
result:
ok single line: '1'
Test #12:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
h
output:
1
result:
ok single line: '1'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
i
output:
1
result:
ok single line: '1'
Test #14:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
j
output:
1
result:
ok single line: '1'
Test #15:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
k
output:
1
result:
ok single line: '1'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
l
output:
1
result:
ok single line: '1'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
m
output:
1
result:
ok single line: '1'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
n
output:
1
result:
ok single line: '1'
Test #19:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
o
output:
1
result:
ok single line: '1'
Test #20:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
p
output:
1
result:
ok single line: '1'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
q
output:
1
result:
ok single line: '1'
Test #22:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
r
output:
1
result:
ok single line: '1'
Test #23:
score: 0
Accepted
time: 1ms
memory: 3452kb
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: 3452kb
input:
u
output:
1
result:
ok single line: '1'
Test #26:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
v
output:
1
result:
ok single line: '1'
Test #27:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
w
output:
1
result:
ok single line: '1'
Test #28:
score: 0
Accepted
time: 1ms
memory: 3472kb
input:
x
output:
1
result:
ok single line: '1'
Test #29:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
y
output:
1
result:
ok single line: '1'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
z
output:
1
result:
ok single line: '1'
Test #31:
score: 0
Accepted
time: 1ms
memory: 3492kb
input:
ae
output:
0
result:
ok single line: '0'
Test #32:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
fg
output:
0
result:
ok single line: '0'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
abacadefagahijakalamanopaqaras
output:
1
result:
ok single line: '1'
Test #34:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
tuvawaxayaz
output:
1
result:
ok single line: '1'
Test #35:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
bababababababababababababababa
output:
1
result:
ok single line: '1'
Test #36:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
babababababababababababababab
output:
1
result:
ok single line: '1'
Test #37:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
ababababababababababababababab
output:
1
result:
ok single line: '1'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
ababababababababababababababa
output:
1
result:
ok single line: '1'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
ababababababababababababababaa
output:
0
result:
ok single line: '0'
Test #40:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
bba
output:
0
result:
ok single line: '0'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
abba
output:
0
result:
ok single line: '0'
Test #42:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
just
output:
0
result:
ok single line: '0'
Test #43:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
some
output:
1
result:
ok single line: '1'
Test #44:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
random
output:
0
result:
ok single line: '0'
Test #45:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
words
output:
0
result:
ok single line: '0'
Test #46:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
ok
output:
1
result:
ok single line: '1'
Test #47:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
done
output:
1
result:
ok single line: '1'
Test #48:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
lastinputline
output:
0
result:
ok single line: '0'