#include<string>
using namespace std;
int p1=1,p2=1,p3=1;
char q=128,ch;
string a;
int zk(char qs,char js)
{
int f=0;
if(p1==2 && qs>96) {f=1;qs-=32;js-=32;}
if(p3==1) for(char i=(qs+1);i<js;++i) for(int j=1;j<=p2;++j) if(p1!=3) a+=i; else a+='*';
else for(char i=(js-1);i>qs;--i) for(int j=1;j<=p2;++j) if(p1!=3) a+=i; else a+='*';
if(f) a+=js+32;
else a+=js;
return 0;
}
int main()
{
scanf("%d%d%d",&p1,&p2,&p3);getchar();ch=getchar();
while(ch!=10)
{
if(ch=='-')
{
ch=getchar();
if((q+1)!=ch)
if(q<ch && ((q<58 && ch<58) || (q>58 && ch>58))) zk(q,ch);
else a=a+'-'+ch;
else a+=ch;
}
else a+=ch;
q=ch;ch=getchar();
}
cout << a << endl ;
return 0;
}
[color=red]超时+输出过短,帮忙看看
题目:字符串的展开
状态: Unaccepted
测评机: Xeond[6]
得分: 80分
提交日期: 2013-2-21 15:54:00
有效耗时: 734毫秒
测试结果1: 通过本测试点|有效耗时391ms
测试结果2: 通过本测试点|有效耗时47ms
测试结果3: 通过本测试点|有效耗时46ms
[color=red]测试结果4: 输出过长|用户输出数据超过标准输出两倍[标准输出74位|选手输出648位] [color=green]
测试结果5: 通过本测试点|有效耗时47ms
[color=red]测试结果6: 选手程序运行超过时限 [color=green]
测试结果7: 通过本测试点|有效耗时62ms
测试结果8: 通过本测试点|有效耗时47ms
测试结果9: 通过本测试点|有效耗时47ms
测试结果10: 通过本测试点|有效耗时47ms