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 songshijia88888 at 2015-07-04 21:13:17 on Problem 1013
1.天平up的情况,交换天平两边的coin,就变成down.这样统一起来过后,问题分析和处理会简化不少。
2.统一过后,记好三次称重中down的次数。
3.分别总计天平两端所有down时的各种coin个数。这些coin中,个数与down的个数相同的,就可能是假的了,而不等的,则可以确定是真的。
4.将所有可能的假coin中,排除掉even时出现的coin,最后会剩下唯一的一个coin,就是最终的正确结果了。
5.按这个思路写的java代码,已经AC。

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