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

为何线段树开30w爆了空间,求解。

Posted by lpl1998 at 2014-07-31 16:01:47 on Problem 1151
const int MAXN = 100005;
vector<double> uy;

struct Line{
	double x,y1,y2;
	int flag;//1 is 左边 ,-1 is 右边 
}line[MAXN];

struct Tree{
	int l,r;
	double sl,sr;//real l && r
	double len;//区间线段总长 
	int cover;//覆盖次数 
	Tree()
	{
		l = r = -1;
	}
}tree[MAXN];

怎么算也到不了1qw啊。。。。
tree[MAXN*3]果断爆,tree[MAXN]就A了,
难道是double占的空间比int更大一点?

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