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

sample

Posted by Cubic at 2005-08-04 22:57:33 on Problem 2526
In Reply To:compare函数不会写啊,教一下? Posted by:zerocool_08 at 2005-08-04 22:49:38
int compare ( const void *a, const void *b )
{
	Type *da = ( Type * ) a,  *db = ( Type * ) b;
	if( da -> x == db -> x)
		return da -> y - db -> y;
	else
		return da -> x - db -> x;
}

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