alphacademy-cpp/hf2/hf3/2.cpp
2022-10-08 13:05:44 +02:00

37 lines
877 B
C++

#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int streak = 0;
bool streake = false;
string input;
vector<char> magan(5);
vector<int> out;
magan = {'a', 'e', 'i', 'o', 'u'};
cin >> input;
for (int i = 0; i < input.size(); i++) {
if (input[i] != magan[0] && input[i] != magan[1] && input[i] != magan[2] && input[i] != magan[3] && input[i] != magan[4]) {
streak++;
streake = true;
// cout << "yes" << ' ' << streak << " "<< streake<< ' '<<input[i]<<endl;
} else if (streake) {
out.push_back(streak);
streake = false;
streak = 0;
// cout << "over"<< endl;
}
}
if (streake) {
out.push_back(streak);
}
for (int i = 0; i < out.size(); i++) {
cout<<out[i]<<" ";
}
}