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 flyingdog at 2006-08-14 20:21:11 on Problem 2967
In Reply To:大牛们:快排都上了,还是超时 Posted by:tcxgsy at 2006-08-14 15:59:36
读入数据的时候记录最小的2个和最大的一个,对应你的s[1]+s[2]>s[Test]操作。
如果通过的话,总数据量大于46个的肯定可行,否则再对46个以内的数据排序判断就行了。
但是即使如此还是会TLE。ft!!!!!
结果狂测数据,只要总数大于500000个的直接输出可行,竟然AC了。
后来又把g++改成了c++,竟然排前几名了。ft!!!!!!
不知道那些用g++是大牛是怎么在1000ms左右过的。

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