计算系数
【题目分析】
相信看到这道题的时候,大家都有那么一丝丝的莫名的心慌(可怜的大家),作为第一题,他为什么不做好自己送分的职责,反而又要注意去模,又要注意long long。
相信只要略微有一点数学底子的同学知道,这其实就是杨辉三角(或组合数),对一个oier用dp的思想就可以解决了。(不知道杨辉三角的,你dp怎么学的…)
【代码】
#define M 1005
#include<cstdio>
#define mod 10007
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int dp[M][M];
int main(){
int i,j,a,b,k,n,m;
scanf("%d