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

不知为何用慢的程序能过但是快的程序TLE...求教高效算法

Posted by Mcfaddan_b at 2008-10-14 21:34:16 on Problem 3145
方法是:对小规模的数据直接打表算,对大规模的数据用分区间查找

开始用了set的分区间查找,不停TLE.后来换了个不用set的方法,随机了大case.
set单case 1W的跑了200ms(TLE),非set的140(AC了).
后来将非set的小数据处理的规模调整到1000(开始100)
单case 1W的跑了700ms左右,但是提交却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