#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(void) {
insHead(1);
insHead(2);
insHead(2);
insHead(3);
printL();
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnR5cGVkZWYgc3RydWN0IG5vZGUgewoJaW50IHZhbDsKCXN0cnVjdCBub2RlICpuZXh0Owp9Tm9kZTsKCk5vZGUgKmhlYWQgPSBOVUxMOwoKdm9pZCBpbnNIZWFkIChpbnQgeCl7CglOb2RlICpwOwoJcD0oTm9kZSopbWFsbG9jKHNpemVvZihOb2RlKSk7CglwLT5uZXh0PWhlYWQ7CglwLT52YWw9eDsKCWhlYWQ9cDsKfQoKdm9pZCBwcmludEwoKXsKCU5vZGUgKnA9aGVhZDt7CgkJd2hpbGUocCAhPU5VTEwpewoJCSAgcHJpbnRmKCIlZCIgLHAtPnZhbCk7CgkJICBwPXAtPm5leHQ7Cgl9Cn0KfQoKaW50IG1haW4odm9pZCkgewppbnNIZWFkKDEpOwppbnNIZWFkKDIpOwppbnNIZWFkKDIpOwppbnNIZWFkKDMpOwpwcmludEwoKTsKCXJldHVybiAwOwp9Cg==