Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
水题啊~~~~~~~~~~菜鸟路过。。TLE一次 还以为要用longlongtypedef 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator