#include #include #include #include using namespace std; vector v[10001]; vector::iterator it; int n,god[10001],st,h[10001]; bool f[10001]; int main() { int i; freopen("famtree.in","rt",stdin); freopen("famtree.out","wt",stdout); cin>>n; int a,b,y; for(i=1;i>a>>b>>y; v[b].push_back(a); god[a]=y; f[a]=1; } bool fl[10001]; queue q; //cout< h[i-1] && h[i] > h[i+1])cout<