| ||||||||||
| 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:求大牛帮忙看看啊!!!In Reply To:求大牛帮忙看看啊!!! Posted by:hejunfei at 2011-10-12 23:42:33 已经AC了,
for(i = 1; i < id-2; i++){ //after[i] 的值为下一段与第i段颜色相同的下标
if(vis[i]) continue;
int tmp = i;
for(j = i+2; j < id; j++)
if(color[tmp] == color[j]){
after[tmp] = j;
tmp = j++;
vis[j] = true;
}
}
改成 tmp=j; vis[j++] = true;
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator