返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,b;
  6.     cin>>a>>b;
  7.     long long int bf[b+1]={0,1,1,1,1,1,1},hu=1e16;
  8.     for(int i=1;i<a;i++)
  9.     {
  10.         for(int j=b;j>=0;j--)
  11.         {
  12.             bf[j]=(bf[max(j-1,0)]+bf[max(j-2,0)]+bf[max(j-3,0)]+bf[max(j-4,0)]+bf[max(j-5,0)]+bf[max(j-6,0)])%hu;
  13.         }
  14.     }
  15.     cout<<bf[b];
  16. }
複製代碼

TOP

返回列表