Output Example data range: 1 <= m,n < 100.
| voting question two |
| difficulty level: C; run time limit: 1000ms; operating space limit: 51200KB; code length limit: 2000000B |
| Question Description /td> |
| Ouyangwen and Yi等 campaign chairman, Wangliangsen is responsible for recount, a total of m+n, the result Ouyangwen win, known Ouyangwen and Yi等 respectively obtained m-ticket and N-ticket (m>n). Now, please calculate how many Ouyangwen the number of votes in the recount process is always more than the number of yi等 votes. |
| input |
| line, including two numbers, respectively, for m and n |
| Output |
A number of
| that represents the number of scenarios that meet the requirements of the topic. |
| Input Example |
| 5 3 |
| 14 |
| Other instructions |
#include <iostream>
using namespace Std;
Long Long f[101][101];
int main ()
{
Long Long m,n;
scanf ("%lld%lld", &m,&n);
F[1][0]=1;
for (int i=1;i<=m;i++)
{
for (int j=0;j<=n;j++)
{
if (i>j && (i!=1 | | j!=0)) F[I][J]=F[I-1][J]+F[I][J-1];
else if (i<=j) break;
}
}
printf ("%lld", F[m][n]);
return 0;
}
Poll Question Two (C + +)