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

Re:感觉这个读入还是比较简单的,推荐大家看看

Posted by lilymona at 2010-02-05 20:46:07 on Problem 1470
In Reply To:感觉这个读入还是比较简单的,推荐大家看看 Posted by:Gamor at 2009-08-05 16:26:03
>      for(int i = 0; i < B; i++){
>              while(getchar() != '(') {}
>              scanf("%d%d", &t1, &t2);
>              Q[t1][++Q[t1][0]] = t2;
>              Q[t2][++Q[t2][0]] = t1;
>              while(getchar() != ')') {}
>      }

直接scanf("%*[^(](%d %d)",&u,&v);

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