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

AC了,空间换时间,没用排序。“39320K 594MS C 890B”。代码只有30+行。

Posted by lachening at 2011-04-14 12:12:59 on Problem 1002
号码是7位数。开一个10000000大小的int数组。 
如果号码是123-4567。就在数组的1234567号计数。  重复则++。
也就是 号码本身作为数组的下标。
当全部统计完以后,for(i=0;i<10000000;i++) 从最小号开始,顺序输出所有数组内容>1的情况   printf("%03d-%04d %d",下标/10000,下标%10000,数组内容);


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