E. 单词覆盖还原

    Type: Default 1000ms 256MiB

单词覆盖还原

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

单词覆盖还原

题目描述

我有一个长度为 ll 的字符串,最开始时,这个字符串由 ll 个句号(.)组成。

我在这个字符串中,将多次把 boy 或者 girl 两单词,依次贴到这个字符串中。

后贴上单词,会覆盖之前贴上的单词,或者覆盖句号。最终,每个单词至少有一个字符没有被覆盖。

请问,一共贴有几个 boy 几个 girl

输入格式

一行被反复贴有 boygirl 两单词的字符串。

输出格式

两行,两个整数。第一行为 boy 的个数,第二行为 girl 的个数。

样例 #1

样例输入 #1

......boyogirlyy......girl.......

样例输出 #1

4
2

提示

数据保证,3l2553\le l\le255,字符串仅仅包含如下字符:.bgilory\texttt{.bgilory}

7月6日BC班课堂题目及作业

Not Attended
Status
Done
Rule
OI
Problem
6
Start at
2024-7-4 16:15
End at
2024-8-15 8:15
Duration
1000 hour(s)
Host
Partic.
19