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

Re:算坐标有什么好算法么?我用的二分好慢

Posted by 20053565 at 2007-04-06 09:01:01 on Problem 3198
In Reply To:算坐标有什么好算法么?我用的二分好慢 Posted by:yiyiyi4321 at 2007-02-08 00:32:46
离散课本 第四章函数 f(i,j) = (i+j)*(i+j+1)/2+j;
令u = f(i,j);
令A = [(sqrt(1+8*u)-1)/2](取整数部分)
则j = u-A*(A+1)/2;i = A-j;
证明书上有。

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