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 felips at 2007-11-05 16:02:47 on Problem 3210
n个coins
1.n个都是正面或反面,则最少要翻两次(同一个coin),因此答案肯定是偶数,由此也可知n为偶数时无解。
2.n为奇数时,则n可以表示为奇数加偶数的形式(即总有偶数!)。不失一般性,设有2i(i为自然数)个币是正面,则为了与结论1兼容,只能翻2i次,且翻n-1次可以“解”所有的情况(因为总有偶数,且对同一个coin翻两次不改变当前的situation)。

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