#include #include #include #include #include #include #include void u8toi(char *str, int *array) { int i; int n = strlen(str); for(i = 0; i < n; ++i) { int flag = str[i]; int mask = ~flag; mask |= (mask >> 1); mask |= (mask >> 2); mask |= (mask >> 4); int res = str[i] & mask; while( 0xC0 <= (unsigned char)flag ) { i += 1; flag <<= 1; res <<= 6; res |= str[i] & 0x3F; } *array++ = res; } *array++ = 0; } int main() { char str[1000]; scanf("%s", str); int str2[1000]; u8toi(str, str2); char t[10] = "…"; int t2[10]; u8toi(t, t2); int c = t2[0]; int res = 0; int temp = 0; for(int i = 0; str2[i] != 0; ++i) { if( str2[i] == c ) { temp += 1; } else { temp = 0; } res = std::max(temp, res); } std::cout << res << std::endl; return 0; }