Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这个方案可以吧!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator