efficient simplicial numbers in miscfunc

This commit is contained in:
2024-04-02 17:54:43 +02:00
parent 8fa7194f2d
commit 2194a785da
3 changed files with 61 additions and 1 deletions

10
t.cc
View File

@@ -28,6 +28,7 @@
#include "simple.h"
#include "graph.h"
#include "numbers.h"
#include "miscfunc.h"
using namespace std;
@@ -3161,7 +3162,7 @@ cout <<a.rsum()<<endl;
cout <<a.csum()<<endl;
}
if(1)
if(0)
{
int n;
cin>>n;
@@ -3175,5 +3176,12 @@ for(int l=1; l<k; ++l)
cout <<count<<" "<<binom(n,4)<<endl;
}
if(1)
{
int d,n;
cin>>d>>n;
cout <<simplicial(d,n)<<" "<<binom(n+d-1,d)<<endl;
}
}