https://vjudge.net/problem/UVA-10943 题意: 把K个不超过N的非负整数加起来,使得它们的和为N,有多少种方法? 思路: d[i][j]表示用i个数加起来为j的方法数. #include<iostream> #include<cstdio> #include<cmath> #include<cstring> using namespace std; +; const int mod=1e6; int n,k; int d[m…
Larry is very bad at math — he usually uses a calculator, whichworked well throughout college. Unforunately, he is now struck ina deserted island with his good buddy Ryan after a snowboardingaccident.They’re now trying to spend some time figuring out…