#include<stdio.h>
#include<stdlib.h>
typedef struct node{
int val;
struct node *next;
}Node;
Node *head=NULL;
void insHead(int x){
Node *p;
p
=(Node
*)malloc(sizeof(Node
)); p->next=head;
p->val=x;
head=p;
}
void printL(){
Node *p=head;
while(p!=NULL){
p=p->next;
}
}
int main(){
insHead(1);
insHead(2);
insHead(2);
insHead(3);
printL();
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RkbGliLmg+Cgp0eXBlZGVmIHN0cnVjdCBub2RlewoJaW50IHZhbDsKCXN0cnVjdCBub2RlICpuZXh0Owp9Tm9kZTsKCk5vZGUgKmhlYWQ9TlVMTDsKCnZvaWQgaW5zSGVhZChpbnQgeCl7CglOb2RlICpwOwoJcD0oTm9kZSopbWFsbG9jKHNpemVvZihOb2RlKSk7CglwLT5uZXh0PWhlYWQ7CglwLT52YWw9eDsKCWhlYWQ9cDsKfQoKdm9pZCBwcmludEwoKXsKCU5vZGUgKnA9aGVhZDsKCXdoaWxlKHAhPU5VTEwpewoJCXByaW50ZigiJWQiLHAtPnZhbCk7CgkJcD1wLT5uZXh0OwoJfQp9CgppbnQgbWFpbigpewoJaW5zSGVhZCgxKTsKCWluc0hlYWQoMik7CglpbnNIZWFkKDIpOwoJaW5zSGVhZCgzKTsKCXByaW50TCgpOwoJcmV0dXJuIDA7Cn0=