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:我直接用一个向量存vector啊

Posted by angeldust at 2012-12-28 09:55:38 on Problem 3274
In Reply To:我直接用一个向量存vector啊 Posted by:ACM06060 at 2007-07-20 21:24:28
> c++过了g++超时
> 时间卡了点呵呵~
存verctor会超时,存指针可以1S过

map<int*,int,cmp> mp;

struct cmp
{
	bool operator()(int* a,int* b) const
	{
		for(int i=0;i<k-1;i++)
		{
			if(*(a+i)<*(b+i)) return 1;
			if(*(a+i)>*(b+i)) return 0;
		}
		return 0;
	}
};

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