当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

BZOJ2295:【POJ Challenge】我爱你啊

题目描述

ftiasch是个十分受女生欢迎的同学,所以她总是收到许多情书。虽然她十分有魅力,然而她却是个低调的人。因此她从来不会告诉别人她到底收到了多少情书。

ftiasch的好朋友1tthinking想知道她到底收到了多少情书。1tthinking知道,ftiasch每次收到一封情书,就会在日记最后写下一个包含"luvletter"子序列的串。比如现在ftiasch的日记是alduddvdletterflusvletetedr,那么ftiasch可能受到了0、1、2封情书。现在给出一些ftiasch的日记,问对于每篇日记,ftiasch最多可能受到多少的情书。

某个序列的子序列是从最初序列通过去除某些元素但不破坏馀下元素的相对位置而形成的新序列。參考wikipedia。

[原归档图片缺失]

输入解释

第1行,一个整数 T (0 ≤ T ≤ 100), 日记的数量。

第2到 T + 1行,ftiasch的日记 (只包含'a'-'z' 和空格, 长度小于100001)

输出解释

第1到T行,一个整数, 最大可能的情书数量。

输入样例
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
输出样例
0
1
3
1
0
提示

BZPRO Powered by Remmina.
Github Repository
来自acmore.cc的附加信息
bzoj_id 2295
import_source_sha256 8f5bf2f8bf86839bec96b027018324847406e4439f7c8e2b5c60e71239948d32
bzoj_checker_pending False

该题目包含在题集 大视野(八中)OJ 中

题目来源 BZOJ 2295

源链接: LOCAL-BZOJ2295

共提交 0 次

通过率 --%
时间上限 内存上限
1000 MS 128 MB