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 HeadHunter at 2013-04-02 18:59:11 on Problem 2214
In Reply To:ft!!居然看不懂例子!! Posted by:ferret_chao at 2005-03-15 16:22:10
一共有N个region,每个region要有半数以上的票才可以赢,求最坏情况下要多少张票才能确保胜利。

先看最简单的
2
12 1

为什么答案是13?因为如果你有12张票,但是另一张票刚好是第2个region的,而且被别人得去了,那这样就是你和别人各得一席,你并没有取得选举的胜利。所以12不行,只能是13了。

大概就是这个意思,能过掉样例并且考虑到奇数region的情况就OK了

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