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 YanXB at 2015-01-04 20:33:50 on Problem 2105
    这题的输入可能包含一些莫名其妙的东西,所以不能直接
    char array[4][8];
    for(i=0;i<4;i++)
       for(j=0;j<8;j++)
          scanf("%c",&array[i][j]);
    而是要
    char array[4][8];
    for(i=0;i<4;i++)
        for(j=0;j<8;j++)
        {
            scanf("%c",&array[i][j]);
            if(array[i][j]<'0'||array[i][j]>'9')
                j--;
        }
    才行,否则要莫名其妙WA的!

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