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

我也是。。。32位机器上64位乘法太慢了

Posted by fuch at 2009-05-17 22:55:22 on Problem 3735
In Reply To:Re:不就是矩阵乘法么...为什么TLE...谁贡献一个大数据吧 Posted by:majia5 at 2009-05-17 14:33:06
> 乘法的时候
> if(mata[i][k]&&matb[k][j])
>   matc[i][j]+=mata[i][k]*mat[k][j];
> 加了就可以过了
> 至于原因,是因为构造出来的矩阵中0很多,这样可以避免乘法次数过多
> 还有就是构造系数的时候需要使用O(n^2)来构造..

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