张博维


私信TA

用户名:dotcpp0690074

访问量:2124

签 名:

藏狐

等  级
排  名 842
经  验 3544
参赛次数 16
文章发表 86
年  龄 11
在职情况 学生
学  校 大庆一中
专  业 吃答辩,c++

  自我简介:

聪明,机智,又勇敢

解题思路:

注意事项:

参考代码:

#include <bits/stdc++.h>

using namespace std;

const int N = 1e3+5;

typedef long long ll;

ll a[N][N];

int main()

{

    a[1][1]=1;

    for(int i=2;i<=1000;i++)

    {

        for(int j=1;j<=1000;j++)

        {

            a[i][j] = a[i-1][j]+a[i-1][j-1];

        }

    }

    int x,y;

    cin>>x>>y;

    cout<<a[x][y];

    return 0;

}


 

0.0分

0 人评分

  评论区