[cpp] #include<iostream> #include <cstdio> #include <cstring> using namespace std; int counter(int x,int y) { if(y==1 || x==0) { return 1; } if(x<y) return counter(x, x); return counter(x,y-1) + counter(x-y,y); } int main() { int t, m, n; cin>>t; for(int i=0; i<t; i++) { cin >> m >> n; cout << counter(m,n) << endl; } return 0; }