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 zzshigan at 2013-10-21 11:46:32 on Problem 1029
正常暴力模拟即可,主要是要考虑周全可能出现的情形。

<1>左右两边相等的情况下,本轮出现所有硬币均标记为TRUE
<2>左边小于右边时,分左右两边处理:
遍历左边:
如果之前已标记为TRUE了,不动,直接continue
如果其硬币之前出现过载大于一组内,标记为TRUE。否则标记为小于

遍历右边:
如果之前已标记为TRUE了,不动,直接continue
如果其硬币之前出现过载小于一组内,标记为TRUE。否则标记为大于

此外接着遍历所有硬币,如果未出现在本轮中,则直接标记为TRUE。

<3>左边大于右边时,参考2进行相同逻辑处理

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