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 |
gcd其实相当于对质因子指数的min操作,lcm相当于对质因子指数的max操作,所以这个问题就是最短路问题了In Reply To:Floyd,用这个 Posted by:applepi at 2010-09-29 15:32:28 > matrix[i][j] = lcm(matrix[i][j], gcd(matrix[i][k], matrix[k][j])); > > 其中matrix是邻接矩阵。 > > 高精度诸位自己想办法吧…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator