/*
水!
*/
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std; const int MAXN = 1e2 + ;
const int INF = 0x3f3f3f3f;
char s[MAXN]; int main(void) //CodeForces 137A Postcards and photos
{
// freopen ("E.in", "r", stdin); while (scanf ("%s", s) == )
{
int len = strlen (s);
int ans = ; int i = ;
while (i < len)
{
char ch = s[i]; int cnt = ;
while (cnt < && i < len)
{
if (s[i+] == ch)
{
++cnt; ++i;
}
else break;
}
ans++; i++;
} printf ("%d\n", ans);
} return ;
}
相关文章
- Codeforces 1090M - The Pleasant Walk - [签到水题][2018-2019 Russia Open High School Programming Contest Problem M]
- Codeforces Round #299 (Div. 2) B. Tavas and SaDDas 水题
- Codeforces630C【水题】
- Codeforces Beta Round #51 A. Flea travel 水题
- 【CodeForces 602B】G - 一般水的题2-Approximating a Constant Range
- Codeforces Round #325 (Div. 2) A. Alena's Schedule 水题
- Codeforces Beta Round #9 (Div. 2 Only) B. Running Student 水题
- Codeforces Round #272 (Div. 2) A. Dreamoon and Stairs 水题
- Codeforces Beta Round #2 A. Winner 水题
- Codeforces Round #367 (Div. 2)---水题 | dp | 01字典树