Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

gcd其实相当于对质因子指数的min操作,lcm相当于对质因子指数的max操作,所以这个问题就是最短路问题了

Posted by 123234345 at 2011-08-01 11:36:09 on Problem 2132
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator