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

真神奇,最好不要在main里面定义大数组

Posted by vcjsp at 2011-02-13 12:25:37 on Problem 2752
这道题如果
#define MAX 400001
main()
{
   char line[MAX];
   int next[MAX];
   int ans[MAX];
}

G++一执行就出错,估计堆栈爆了

后面我干脆直接用line来存结果,不知道怎么回事,WA

最后我妥协了,把以上局部变量定义放到全局定义,立马AC


建议以后对于大数据,直接在全局变量定义

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