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 lql_accept at 2009-05-25 09:55:57 on Problem 1006
In Reply To:本题的思想 Posted by:roc496 at 2009-05-07 15:02:30
> /*************************************
> * 中国剩余定理
> * q mod i = x, q mod j = y, q mod k = z
> * 令 A = j*k*a, A mod i = 1;
> *    B = i*k*b, B mod j = 1;
> *    C = i*j*c, C mod k = 1;
> * 得到 circle = A+B+C -1
> * q(min) = (A*i + B*j + C*k)%circle
> *************************************/
> 直接计算出ABC之后再代入计算

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