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 answer_allon at 2008-02-27 09:45:10 on Problem 1013
In Reply To:Re:为便于理解,给组反例,详见内. Posted by:answer_allon at 2008-02-27 09:35:07
> 这种方案可以吧。用两个数组变量来存放权重: int left[12],right[12]. "even"时就对两个都操作。"up", 左边出现的字符i在对应的left[i]进行+1 , 右边的字符j在对应的right[j]进行+1. 最后比较两数组中得到最大的,顺便判断轻重。

还想说一下,如果是"down"时,操作和"up"时的操作反过来就行了。

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