题目链接:传送门
看到题目就进来了
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <algorithm>
#include <climits>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#define
#define
using namespace std;
typedef long long ll;
char s[A], a[] = "luvletter";
int main(int argc, char const *argv[]) {
int T; cin >> T; getchar();
while (T--) {
int ans = 0; gets(s);
for (int i = 0, j = 0; s[i]; ++i) {
if (s[i] == a[j]) ++j;
if (j > 8) j = 0, ++ans;
}
cout << ans << endl;
}
return 0;
}