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 |
被超时逼得没法了,0秒过你信不#include<stdio.h> __int64 array[12][12]={{0,1,0,1,0,1,0,1,0,1,0},{1,2,3,5,8,13,21,34,55,89,144},{0,3,0,11,0,41,0,153,0,571,0}, {1,5,11,36,95,281,781,2245,6336,18061,51205},{0,8,0,95,0,1183,0,14824,0,185921,0}, {1,13,41,281,1183,6728,31529,167089,817991,4213133,21001799}, {0,21,0,781,0,31529,0,1292697,0,53175517,0}, {1,34,153,2245,14824,167089,1292697,12988816,108435745,1031151241,8940739824}, {0,55,0,6336,0,817991,0,108435745,0,14479521761,0}, {1,89,571,18061,185921,4213133,53175517,1031151241,14479521761,258584046368,3852472573499}, {0,144,0,51205,0,21001799,0,8940739824,0,3852472573499,0}}; int main() { int h,w; while(scanf("%d%d",&h,&w)!=EOF&&!(h==0&&w==0)) { printf("%I64d\n",array[h-1][w-1]); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator