#include<bits/stdc++.h>
using namespace std;
int cnt[100005];
int main()
{
char c,d='0';
int s=1,n=0;
while(cin>>c)
{
n++;
if(c==d)
{
cnt[s]++;
}
else
{
cnt[++s]++;
d=c;
}
}
cout<<sqrt(n)<<" ";
for(int i=1;i<=s;i++)
{
cout<<" "<<cnt[i];
}
}
样例过了,为啥交上去0分???