Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
RE注意一下的注意一下!!!我的部分代码如下: 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator