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 Tune at 2012-08-04 01:32:41 on Problem 3345 and last updated at 2012-08-04 01:59:34
gets(op);
int t=0;
while(~sscanf(op+t,"%s",s))	
	{
		puts(s),t+=strlen(s)+1;
		while(op[t]==' ')	++t;
	}

1. 先整行读入,再按空格分别读入……
2. 另外官方测试数据里没有空格……
(http://sharif.edu/~acmicpc/acmicpc06/problems/Tc.zip,G题……)
3. country name 不超过30……

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