我爱毛中特
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.
背景
大家都知道,20级的学长学姐们刚刚考完毛概,其中dumpline更是考的一塌糊涂,对毛概愈加的热爱,所以dumpline想在每一句话中都得到"mg",请你帮忙数数看每句话中能组成多少个mg呢,注:每个“m”只能和他右边的g组成“mg”。
输入
给你一串字符串,找出其中mg的个数,字符串的长度小于100000
输出
输出mg的个数即可
Samples
masdfdsggmg
4
Limitation
1s, 1024KiB for each test case.
SWPU ROUND #5(DIV.2)
- Status
- Done
- Rule
- IOI
- Problem
- 8
- Start at
- 2021-12-4 9:00
- End at
- 2021-12-4 12:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 30