问题 2491 --I Love U

2491: I Love U

题目描述

  

ftiasch is a studentwho is popular among girls so she always gets a lot of luv letters. Althoughshe is attracting, she is such a person of low profile that she will never tellothers how many luv letters she has received.

1tthinking, the friendof ftiasch, wants to know the number of luv letters. 1tthinking have onlylearned that every time ftiasch receives a luv letter, she will write a stringcontaining a subsequence "luvletter" in his diary. For instance,ftiasch could get 0, 1 or 2 luv letters if there is a string"alduddvdletterflusvletetedr" in his diary. Now give you somediaries, 1tthinking is desired to figure out the largest possible number of luvletters ftiasch could get.

A subsequence is a sequence that can be derived fromanother sequence by deleting some elements without changing the order of theremaining elements. 

输入

Line 1: an integer T (0 ≤ T ≤ 100), the number of diaries. Line 2 to T + 1: ftiasch's diary (contain only 'a'-'z' and whitespace, the length will smaller than 10001).

输出

Line 1 to T: an integer, the largest possible number of luv letters ftiasch could get.

样例输入输出

输入#1 复制
5
t
llllluvletterrr
luvletterlauavalaeatataearaluvletter
is wzk a famous boy yes buz he always receives a lot of luv letters
my heart beats her waves at the shore of the world and writes upon it her signature in tears with the words i love thee
输出#1 复制
0
1
3
1
0

提示

序号 标题 作者 发表时间 费用 订购数 操作