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

我几乎敢肯定,这题的输出有问题

Posted by majiavon at 2009-02-07 01:24:57 on Problem 1060
for(i=m+n-2;i>=0;i--)
{
     if(s[i]==1 || i==0)
     {
          printf("%d",i+1);
          for (int j=i;j>=0;j--)  printf(" %d",s[j]);
          printf("\n");
          break;
     }
}
AC了

for(i=m+n-2;i>=0;i--)
{
     if(s[i]==1 || i==0)
     {
          cout<<i+1;
          for (int j=i;j>=0;j--)  cout<<ends<<s[j];
          cout<<endl;
          break;
     }
}
居然wa
实在令人费解,难道ends与" "有区别?!我还专门把这两种输出方法放在相邻的两行输出,结果对的整整齐齐

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