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

C写的,用的排序,Time Limit 搞了一下午,结论是自己写的快排效率太低,另外好多需要注意的地方

Posted by SmileOrange at 2012-09-03 21:25:16 on Problem 1002
搞了一下午,老是TimeLimitExceeded,试了老半天怎么都不行,
最后用了系统函数qsort,然后他就ac了,o(╯□╰)o

另外好多地方要注意:
1.输入的字符串可能很长,比如--------3--33-3-4--33--,字符数组开大些,50就可以
2.没有重复号码时要输出 No duplicates.  
3.电话号码任何位置都可以为0,比如0000000
   输出时可以使用:
    printf("%03d-%04d %d\n", pre/10000, pre%10000, num);
    其中pre是要输出的电话号码,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