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

输入行末可能有空格 scanf+gets() c++ g++可过

Posted by NEAU19170228 at 2018-03-28 19:37:29 on Problem 1251
    while(~scanf("%d",&n)&&n)
    {

        for(i=0; i<n-1; i++)
        {
//            getchar();
            gets(s);
//            cin>>x>>m;
            scanf("%c%d",&x,&m);
            for(j=0; j<m; j++)
            {
                getchar();
//                cin>>y>>len;
                scanf("%c%d",&y,&len);
                road[num].x=x-'A';
                road[num].y=y-'A';
                road[num].len=len;
                ++num;
            }
        }

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