/*
水!
*/
#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 652C Foe Pairs 水题
- codeforces水题100道 第十二题 Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division (brute force)
- Codeforces Round #371 (Div. 2) C. Sonya and Queries 水题
- Educational Codeforces Round 9 A. Grandma Laura and Apples 水题
- Codeforces Round #575 (Div. 3) D2. RGB Substring (hard version) 水题
- Codeforces Round #355 (Div. 2) B. Vanya and Food Processor 水题
- Codeforces Round #368 (Div. 2) A. Brain's Photos (水题)
- Codeforces Round #355 (Div. 2) A. Vanya and Fence 水题
- Codeforces Round #290 (Div. 2) A. Fox And Snake 水题
- Codeforces Round #368 (Div. 2) A. Brain's Photos 水题