링크 : https://www.acmicpc.net/problem/2775
#include <iostream>
#include <vector>
using namespace std;
int main() {
int T = 0, k = 0, n = 0;
cin >> T;
vector < vector <int> > v(15,vector <int>(15,0));
for(int i = 0; i < T; i ++){
cin >> k >> n;
for(int a = 0; a <= k; a++){
for(int b = 1; b <= n; b++){
if(a == 0){
v[0][b] = b;
}
else if(b == 1){
v[a][1] = 1;
}
else{
v[a][b] = v[a-1][b] + v[a][b-1];
}
}
}
cout << v[k][n] << endl;
}
return 0;
}