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 codegear at 2012-09-21 20:36:44 on Problem 1002
In Reply To:最简单的做法 Posted by:772877156 at 2012-07-20 16:05:20
printf("%03d-%04d %d\n", i/10000, i%10000, a[i])
就行了
> 就是直接用电话号码做索引,一千万的数组,还是可以开的
> 这样的好处是不用排序了
> 输出的时候要注意一下,不要直接printf("%d-%d %d\n", i/10000, i%10000, a[i]),因为前端的0会输不出来的。必须一位一位输出
> 供参考

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