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 |
提供一个思路将c[i] 排序 同时交换 father下标 tag下标 从最大的开始、 每次 set(int i) { while(1) { if(tag[father[i]]==true) breal; else { tag[i]=true; i=fatehr[i];} }} Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator