-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboj2775.cpp
More file actions
44 lines (39 loc) · 799 Bytes
/
boj2775.cpp
File metadata and controls
44 lines (39 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
const int MAX = 10e+6;
const int INF = 0x66554433;
int arr[15][15];
inline void Quick_IO(){
ios_base :: sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
}
int main(){
Quick_IO();
for(int i = 1;i<=14;i++){
arr[0][i] = i;
}
for(int i = 1;i<=14;i++){
for(int j = 1;j<=14;j++){
arr[i][j] = arr[i][j-1]+arr[i-1][j];
}
}
// for (int i = 0; i < 14; ++i) {
// for (int j = 0; j < 14; ++j) {
// cout<<arr[i][j]<<" ";
// }
// cout<<endl;
// }
int t;
cin>>t;
while(t--){
int k, n;
cin>>k>>n;
cout<<arr[k][n]<<"\n";
}
return 0;
}