int hehe(int m,int n) { if(m==0||n==1) return 1; if(m<n) return hehe(m,m); return hehe(m,n-1)+hehe(m-n,n); }
int main() { int t,m,n; scanf("%d",&t); for(;t>0;t--) { scanf("%d%d",&m,&n); printf("%d\n",hehe(m,n)); } return 0; }
void hehe(int x,int y) { int i; for(i=0;i<8;i++) { if(you[y+y1[i]][x+x1[i]]=='@'&&y+y1[i]<g&&x+x1[i]<k) { you[y+y1[i]][x+x1[i]]='*'; hehe(x+x1[i],y+y1[i]); } } }
int main() { int u,p; scanf("%d%d",&g,&k); while(g!=0&&k!=0) { mm=0; start(); for(u=0;u<g;u++) { for(p=0;p<k;p++) if(you[u][p]=='@') { you[u][p]='*'; mm++; hehe(p,u); } } printf("%d\n",mm); scanf("%d%d",&g,&k); } return 0; }
{ return 0; } static int f3(lua_State* L) { return 0; } static float c_add(int a, int b, float c) { return a + b + c; } const std::string test_lua = " \ hehe() \ z.zap_1() \ z.zap_2() \ b.zap_1() \ b.zap_2() \ g_pp = g_hehe \ function PI() \ return 3.14 \ end \ function l_add(i,j) \ return i+j \ end \ function cc(a,b,c) \ return c_add(a,b,c) \ end \ function test_ret(i) \