#include #include using namespace std; using V=vector; int main(){ int N,Q;cin>>N>>Q;dequeq; for (long long i=0,a;i>a,q.push_back(V{a-1,1}); while(q.size()>1)q.push_back(atcoder::convolution(q[0],q[1])),q.back().resize(min(size(q.back()),N+1)),q.pop_front(),q.pop_front(); for (int i=0,b;i>b,cout<