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 snoopy at 2006-10-21 21:20:32
In Reply To:过了MSN message f题的,说一下,贪心能不能过???ci,si排序,依次对应?谢谢了 Posted by:need130 at 2006-10-21 20:12:48
估计是题目描叙有点唬人,把大家都弄晕了,最后看懂题后想水,其他人都bs我...还好一次就写过了
就是把所有的si算出来,逆序排,ci逆序排,然后就是对应的计算sum(abs(si-ci));
算si是用的两个集合取并,感觉没看懂题能更好的理解这一点

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