#include using namespace std; typedef unsigned int uint; typedef long long int ll; typedef unsigned long long int ull; #define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout< ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout< ostream& operator <<(ostream &o,const pair p){o<<"("<> parts[105]; bool createable[105]; int dp[105]; int calc(int target){ if (target==n){ return 1; } if (dp[target]) return dp[target]; int result=0; for (auto p:parts[target]){ result+=calc(p.second)*p.first; } return dp[target]=result; } int main(){ int i,j,k,l; cin>>n>>m; for (i=0;i