杭电 1020 无法AC
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/09 13:43:05
杭电 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
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
把 gets(a) 换成 cin >> a;
再问: 不一样吗?
再答: 不一样
再问: 为什么cin>>a可以ac?gets为什么不行?
再答: gets不忽略空格
再问: 不一样吗?
再答: 不一样
再问: 为什么cin>>a可以ac?gets为什么不行?
再答: gets不忽略空格
iphone5无法充电,未充满电电池符号却显示小插头,充不进去电,
为什么总是存在电中性?一个系统总是无法对外显电性?
汽车电瓶有电,但是钥匙扭到发动位置却无法发动,如何解决
建筑弱电图纸里面的MT25 CC AC
我的电瓶车无法启动.我的电瓶车电瓶有电,按喇叭也有声音,但是就是无法启动,显示电量也没有,有时候有,但是一启动就马上没电
什么叫三相电不平衡?把三相电用到照明上我想它电流始终是不平衡的,我还真的无法理解,请老师傅指教
杭电 2010
饮水机不加热了?接上电后,只亮保温的灯,和电源灯,加热灯不亮了,无法加热
电压力锅加热途中自己排气”加热完成后进入保温状态后无法重新开始加热.
酒店感应取电开关插入卡后电路一会通一会断,房间电器无法使用,啥原因?
电
杭电ACM 水题 Encoding