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 |
Re:这题方法好多啊。完全水过。O(n*m)也跑了282ms。In Reply To:这题方法好多啊。完全水过。O(n*m)也跑了282ms。 Posted by:winsweet at 2008-08-26 11:49:15 > 开始没注意要用64位整型-,- > > ans=0; > for (i=1;i<=n;i++) { > tt=0; > for (j=1;j<=m;j++) { > if (mat[i][j]) { > ans+=tt; > t[j]--;//这里面存放的是西岸有多少点与东岸的J相连。 > } > tt+=t[j]; > } > } 。。。。。 __int64啊。。真是的 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator