Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

WA的注意了

Posted by 408912295 at 2010-08-26 20:08:54 on Problem 1026
你的主程序未必错误。错误原因是
1:最后一次输出时没有输出空行。
2:结束有错误。
比如:
把输入部分换为
int main()
 while(1)
{
    scanf("%d",&a);
    if(!a)break;
    for()
    ……
    while(1)
  {
    scanf("%d",&c);
    if(!c)break;
    gets(e);
    ……
  }
  printf("\n");//不要忘记。
 }
 return 0;
}或许就可以了!!
//////////////////////////////
本人当时
int main()
{
    scanf("%d",&a);
    for()
    ……
    while(1)
   {
    scanf("%d",&c);
    if(!c)break;
    gets(e);
    ……
   }
   printf("\n");//不要忘记。
   cin>>c;
   return 0;
}
这样就错了。试了十几次,终于找出来了!!!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator