1 #include <cstdio>
2 #include <string.h>
3 __int64 f[61][61];
4 char ch;
5
6 inline void scan(int &x){
7 while(ch=getchar(),ch<'0'||ch>'9');x=ch-'0';
8 while(ch=getchar(),ch>='0'&&ch<='9')x=10*x+ch-'0';
9 }
10 int main(){
11 memset(f,0,sizeof(f));
12 int i,j;
13 for(i=1;i<=60;i++)
14 for(j=1;j<=i;j++){
15 if(f[i-1][j]==0){
16 f[i][j]=1;continue;
17 }
18 f[i][j]=f[i-1][j]*2;
19 }
20 int t;
21 scan(t);
22 while (t--){
23 int a,b;
24 scan(a);
25 scan(b);
26 printf("%I64d\n",f[a][b]);
27 }
28 return 0;
29 }
30
posted on 2012-03-22 23:35
Leo.W 阅读(223)
评论(0) 编辑 收藏 引用