lucky_to_future @ 2024-03-06 15:45:21
using namespace std; int main(){ string s1;string s2; cin>>s1; int len =s1.size(); s2=s1;
for(int i=1;i<len;i++){
string ss;
cin>>ss;
s2+=ss;
}
cout<<len<<" ";
int k=1;
for(int i=0;i<len*len-1;i++){
if(s2[i]==s2[i+1]) k++;
else{cout<<k<<" ";k=1;}
}cout<<k;
}
by Disjoint_cat @ 2024-03-06 15:58:37
第一个数表示连续有几个
\texttt 0
也就是说如果左上角是
@lucky_to_future