QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#344301 | #8248. Is Y a Vowel? | Haidy_Yasser# | AC ✓ | 0ms | 3872kb | C++14 | 1.1kb | 2024-03-03 23:36:16 | 2024-03-03 23:36:17 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(x) int(x.size())
#define all(vec) vec.begin(), vec.end()
#define rall(vec) vec.rbegin(), vec.rend()
#define cin(v) for (auto& cn : v) cin >> cn;
#define cout(v) for (auto &cn : v) cout << cn << " ";
#define MOD int(1e9+7)
// #define endl "\n"
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
void Haidy()
{
ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#ifndef ONLINE_JUDGE
//freopen("input.txt","r",stdin),freopen("output.txt","w",stdout);
#endif
}
void solve();
int main()
{
Haidy();
int t = 1;
// cin >> t;
for(int i = 1;i<=t; i++)
{
solve();
}
return 0;
}
// int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
// int dy[] = {1, -1, 0, 0, 1, -1, -1, 1};
struct team{
int id, school;
};
void solve()
{
string s;
cin >> s;
string vowels = "aeiou";
int y = 0, cnt = 0;
for(char& c : s){
if(vowels.find(c) != string::npos)
cnt++;
if(c == 'y') y++;
}
cout << cnt << " " << cnt + y;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
input:
asdfiy
output:
2 3
result:
ok single line: '2 3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
asdeyy
output:
2 4
result:
ok single line: '2 4'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
y
output:
0 1
result:
ok single line: '0 1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
masiwbtuqcbhfebhiehrfynodgmdujstvivcamakuqsulxjfni
output:
14 15
result:
ok single line: '14 15'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
hbbfiriglpvpzhqgloaezhbbduyeppuydieusencegnaoxigus
output:
17 19
result:
ok single line: '17 19'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
qwerty
output:
1 2
result:
ok single line: '1 2'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
yyyyy
output:
0 5
result:
ok single line: '0 5'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
asde
output:
2 2
result:
ok single line: '2 2'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
qwqwplkjhgfdsxncmnbvzxc
output:
0 0
result:
ok single line: '0 0'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
aiuoefgh
output:
5 5
result:
ok single line: '5 5'