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

水题啊~~~~~~~~~~菜鸟路过。。TLE一次 还以为要用longlong

Posted by 1083595345 at 2015-07-26 11:40:04 on Problem 1579
typedef long long ll;

ll num[30][30][30];

    ll a,b,c;
    for(int i=1;i<21;i++)
        for(int j=1;j<21;j++)
            for(int l=1;l<21;l++)
                num[i][j][l]=w(i,j,l);
    while(~scanf("%lld%lld%lld",&a,&b,&c) && (a!=-1 || b!=-1 || c!=-1) )
    {
        if(a<=0 || b<=0 || c<=0) printf("w(%lld, %lld, %lld) = 1\n",a,b,c);
        else if(a>20 || b>20 || c>20) printf("w(%lld, %lld, %lld) = %lld\n",a,b,c,num[20][20][20]);
        else printf("w(%lld, %lld, %lld) = %lld\n",a,b,c,num[a][b][c]);
    }

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