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

Re:统计选手出现次数 的位置 错了!

Posted by ecjtuzxg at 2008-07-20 10:55:46 on Problem 2092 and last updated at 2008-07-20 10:57:34
In Reply To:下面的程序有什么错语呢??我记录了第一和第二的,与第二相等的就是第二。。。 Posted by:MasterLuo at 2008-04-23 20:33:41
我开始也和你一样,但是是有错误的。

比如"1 2 1 2 1 2 1 2 3 3",这组数据:
  若按照你的算法,统计到最后一个“2”时,max=4,sec=3了。再加上“3 3”,sec依然是3。
  而正确结果是 max=4,sec=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