#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]; int want[105]; void calc(int target,int number){ if (parts[target].size()==0){ want[target]+=number; return ; } for (auto p:parts[target]){ calc(p.first,number*p.second); } } int main(){ int i,j,k,l; cin>>n>>m; for (i=0;i