讨论 / 为什么读取测评点数据失败....在本机上数据都对的
sonack 2014-07-13 20:50:13
点我顶贴 收藏 删除
这段代码有什么问题吗 在本机运行很良好啊

传上来就读取不了输出数据

题目是 3 JAM的计数法

#include <stdio.h>

int main()

{

int s,t,w,i,j,count=0;

char str[6]={0};

scanf("%d%d%d",&s,&t,&w);

scanf("%s",str);

while(count!=5)

{

i=w-1;

j=t;

while(str[i--]==96+(j--)) {if(i==-1) return 0;}

str[++i]++;

for(j=i+1;j<=w-1;j++)

str[j]=str[i]+j-i;

if(str[w-1]<=96+t){ printf("%s\n",str); count++;}

else return 0;

}

return 0;

}

#1 掐大肥@2014-07-17 06:56:01
回复 删除
同感!

第一次上RQNOJ,做a+b problem,五次提交,全部WA!

代码:

#include<iostream>

using namespace std;

int main()

{ int a,b;

cin>>a>>b;

cout<<a+b;

  return(0);  

}

查看更多回复
提交回复