#include #include enum yn{yes,no}; struct cell{ int element; struct cell *right; struct cell *left; }; enum yn member(int x,struct cell *p); void insert(int x,struct cell **p); int min(struct cell *p); void main(int argc,char* argv[]){ struct cell *init; enum yn a; int x; int b,c; init=NULL; scanf("%d",&b); for(int i=0;ielement==x) return(yes); if(q->elementright; else q=q->left; } return(no); } void insert(int x,struct cell **p){ struct cell *q,**r; r=p; q=*r; while(q!=NULL){ if(q->element==x) return; if(q->elementright); q=q->right; } else { r=&q->left; q=q->left; } } *r=(cell *)malloc(sizeof(cell)); (*r)->element=x; (*r)->left=NULL; (*r)->right=NULL; return; } int min(struct cell *p){ struct cell *q,*r; q=p; if(q==NULL){ printf("aaa"); exit(1); } while(q!=NULL){ r=q; q=q->left; } return (r->element); }