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 |
这题好好玩~见内没想到什么好算法,于是就暴力了, 先用了一个 10^3 * 10^4 * 10^3 = 10^10 的暴力算法,结果2000+ms过了~ 然后用了一下路径压缩 10^3 * 10^4 * α = 10^7 的算法,然后就900+ms了~ 代码很短,去掉头文件的话大概不到 1000B 了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator