You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
442 B
C++
17 lines
442 B
C++
#define _CRT_SECURE_NO_WARNINGS
|
|
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
|
|
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
int C[201][201];
|
|
int main()
|
|
{
|
|
C[0][0] = 1;
|
|
for (int i = 1; i <= 200; i++)
|
|
for (int j = 1; j <= i; j++)
|
|
C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000;
|
|
int n, m;
|
|
while (scanf("%d%d", &n, &m) && (n | m))
|
|
printf("%d\n", C[n + m][m]);
|
|
return 0;
|
|
}
|