#include
#include
typedef struct __two_lif {
long long int data;
struct __two_lif * left;
struct __two_lif * right;
} twolify,*lptlfy;
typedef struct __one_lif {
struct __one_lif * roof;
struct __one_lif * next;
struct __two_lif * lpt;
int D;
} onelify,*lpolfy;
lpolfy create_aone__(lpolfy al,lptlfy rl,int D) {
al->roof = NULL;
al->next = NULL;
al->lpt = rl;
al->D = D;
return al;
}
void free_alifyone(lpolfy l) {
lpolfy n;
while(l!=NULL) {
n = l->next;
free(l);
l = n;
}
}
lpolf