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

这题枚举就过了。。。

Posted by stfairy at 2007-11-13 22:26:16 on Problem 1006
    while(p!=-1 && e!=-1 && i!=-1 && d!=-1)
    {
        p0=p%23;
        e0=e%28;
        i0=i%33;
        count++;
        for(day=d+1;(day-p0)%23!=0 || (day-e0)%28!=0 || (day-i0)%33!=0;day++);
        printf("Case %d: the next triple peak occurs in %d days.\n", count, day-d);
    }

过了,还370MS,数据太弱了~

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