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 |
How to handle P ?I submited lots of times, but I don't know how to cut time.(my algorithm always TLE) This is my algorithm of handle P. I using Union-Find. And I save a distance current node with parent node. parent node is always north position under current node. So if two input node are same group, I check their distance is right or wrong. Otherwise I connect them and settle their distance. the rest is up to bellman-ford algorithm. this is my algorithm. so please teach me how to do get ACC not TLE. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator