杭电 1020 无法AC Problem DescriptionGiven a string containing only 'A' - 'Z',we could encode it using the following method:1.Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/11 23:36:42
杭电 1020 无法AC Problem DescriptionGiven a string containing only 'A' - 'Z',we could encode it using the following method:1.Each sub-string containing k same characters should be encoded to
xSMK#A+e.сQAvAt=tf*3꡻c\"Oݓ_ɎU_U/`A~{>+9p #%r#$s$ࠍ@$pAe()޶9,)100eI&2MѤ2b=gN 4Z+TtǸdHh5`BhHh'lUGAEmU]f App]g`= )1)!{mz{#. 3/eBi ۉNV`bmɀE<6iUe*#=MZJDnhM ذx% mVNWQuJźU b\X XR<װ|P,~BdKSX|

杭电 1020 无法AC Problem DescriptionGiven a string containing only 'A' - 'Z',we could encode it using the following method:1.Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string
杭电 1020 无法AC
Problem Description
Given a string containing only 'A' - 'Z',we could encode it using the following method:
1.Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string.
2.If the length of the sub-string is 1,'1' should be ignored.
Input
The first line contains an integer N (1 n;
\x05while(n--)
\x05{
\x05\x05t=0;
\x05\x05t1=0;
\x05\x05i=0;
\x05\x05gets(a);
\x05\x05while(a[i]!=NULL)
\x05\x05{
\x05\x05\x05count=1;
\x05\x05\x05while(a[i]==a[i+1])
\x05\x05\x05{
\x05\x05\x05\x05count++;
\x05\x05\x05\x05i++;
\x05\x05\x05}
\x05\x05\x05
\x05\x05\x05if(count==1)
\x05\x05\x05\x05cout

杭电 1020 无法AC Problem DescriptionGiven a string containing only 'A' - 'Z',we could encode it using the following method:1.Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string
把 gets(a) 换成 cin >> a;