| ||||||||||
| 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:为什么会TLE?已经是O(n^2logn)的了啊!In Reply To:为什么会TLE?已经是O(n^2logn)的了啊! Posted by:caizhicong0503 at 2007-03-19 21:53:24 此题貌似以EOF结束输入,改为while(scanf("%d", &n)==1&&n)就WA了,你在
for(j=1;j<k;j++){
if(p[j]==p[j-1]) t++;
else{
if(Max<t) Max=t;
t=1;
}
}
外再加一句
if(Max<t) Max=t;
就可以AC了
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator