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:majiaN at 2008-10-19 10:58:32 ch[k]=(ch[k]+ch[p[k]])%3; //这个向量关系需要发现 if ((ch[x]-ch[y]+3)%3!=d)//这个关系根据上面的可以自己用向量推 ch[tp]=(ch[y]-ch[x]+d+6)%3;//这个同理 怎么得到或验证上述关系? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator