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

名次进入1000,发帖留念一下.........当前rank 999 ^_@

Posted by jackland at 2007-09-24 23:16:50 on Problem 2545
名次进入1000,发帖留念一下.........当前rank 999               ^_@


此题只需要用一个队列即可
,设3变量s1,s2,s3 , 表示当前*p1 , *p2..扩展到了s1,s2,s3的位置
k:=min( F[s1]*p1 , max(F[s2]*p2, F[s3]*p3) );
F[i]:=k;
    if abs(k-F[s1]*p1) < eps then inc(s1);
    if abs(k-F[s2]*p2) < eps then inc(s2);
    if abs(k-F[s3]*p3) < eps then inc(s3);
这样即可,嘿嘿我是很水的讲的不好别介意...


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