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注意一下的注意一下!!!

Posted by q475027014 at 2015-11-12 23:57:55 on Problem 3294
我的部分代码如下:
rfor(i,1,n)
{
	scanf("%s",str+pos);
	len=strlen(str+pos);
	r=max(len,r);
	str[pos+len]='~'+i;
	rfor(j,0,len-1)
	belong[pos+j]=i;
	pos+=len+1;
}
这样会RE,可能会爆char
把str用一个int数组存就ok了...
Boom shakalaka!! 终于AC了..马上结束后缀数组开始学SAM了...LALALLA
rfor(i,1,n)
{
	scanf("%s",str+pos);
	len=strlen(str+pos);
	rfor(j,pos,pos+len-1)
	B[j]=str[j];
	r=max(len,r);
	B[pos+len]=126+i;
	rfor(j,0,len-1)
	belong[pos+j]=i;
	pos+=len+1;
}

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