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

在建平衡树前对数据排序,用sort可以,用qsort就TLE了.这是为什么啊?

Posted by false at 2008-04-12 22:03:12 on Problem 1442
我的qsort的cmp方法这么写的
int cmp(const void * p1, const void * p2){
	return (*(int*)p1) - (*(int*)p2);
}

qsort(a, u, sizeof(int), cmp);

有什么问题么?真奇怪啊
去看看STL原理去....

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