#include<stdio.h>
#include<iostream>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
int fina, n, st;//终点,步数,起点
int ans;
int main()
{
while (cin >> fina >> n >> st)
{
int dp[105][2];
memset(dp, 0, sizeof(dp));
dp[st][0] = 1;
int d = 1;
for (int i = 0; i < n; i++)
{
for (int j = 1; j <= 100; j++)
{
dp[j][d] = dp[j - 1][1 - d] + dp[j + 1][1 - d];
}
d = 1 - d;
}
cout<<dp[fina][1-d]<<endl;
}
return 0;
}
swusoj(将军鬼上身啦!(0324))
最新推荐文章于 2018-04-18 16:38:51 发布