#include<bits/stdc++.h>
using namespace std;
#define int long long
#define SIZE(a) (int)(a).size()
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define REP(i,a) FOR(i,0,(a)-1)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
typedef vector<int> VI;
void jebaj() {
string s;
cin >> s;
string samo = "eyuioa";
int last = -1;
int res = 0;
FOR(i, 2, SIZE(s) - 1) {
int ile = 0;
for (int a : {-2, -1, 0})
ile += (find(ALL(samo), s[i + a]) != samo.end());
if (ile == 0 || ile == 3) last = i - 2;
res += last + 1;
}
cout << res << "\n";
}
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
jebaj();
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #include<bits/stdc++.h> using namespace std; #define int long long #define SIZE(a) (int)(a).size() #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define REP(i,a) FOR(i,0,(a)-1) #define ALL(v) (v).begin(),(v).end() #define PB push_back typedef vector<int> VI; void jebaj() { string s; cin >> s; string samo = "eyuioa"; int last = -1; int res = 0; FOR(i, 2, SIZE(s) - 1) { int ile = 0; for (int a : {-2, -1, 0}) ile += (find(ALL(samo), s[i + a]) != samo.end()); if (ile == 0 || ile == 3) last = i - 2; res += last + 1; } cout << res << "\n"; } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); jebaj(); } |
English