#include <stdio.h>
#include <stdlib.h>
typedef struct Node{
int data;
struct Node *next;
} Node;
void cr_list(Node *head){
Node *tmp;
int in;
while(in != EOF){
if(head == NULL){
head
= (Node
*)malloc(sizeof(Node
)); head->data = in;
head->next = NULL;
}else{
tmp
= (Node
*)malloc(sizeof(Node
)); head->data = in;
head->next = tmp;
}
}
}
void print(Node *head){
Node *p;
p = head;
while(p){
p = p->next;
}
}
int main(){
int pause;
Node *head = NULL;
cr_list(head);
print(head);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnR5cGVkZWYgc3RydWN0IE5vZGV7CglpbnQgZGF0YTsKCXN0cnVjdCBOb2RlICpuZXh0Owp9IE5vZGU7Cgp2b2lkIGNyX2xpc3QoTm9kZSAqaGVhZCl7CglOb2RlICp0bXA7CglpbnQgaW47CgoJc2NhbmYoIiVkIiwgJmluKTsKCXdoaWxlKGluICE9IEVPRil7CgkJaWYoaGVhZCA9PSBOVUxMKXsKCQkJaGVhZCA9IChOb2RlICopbWFsbG9jKHNpemVvZihOb2RlKSk7CgkJCWhlYWQtPmRhdGEgPSBpbjsKCQkJaGVhZC0+bmV4dCA9IE5VTEw7CgkJfWVsc2V7CgkJCXRtcCA9IChOb2RlICopbWFsbG9jKHNpemVvZihOb2RlKSk7CgkJCWhlYWQtPmRhdGEgPSBpbjsKCQkJaGVhZC0+bmV4dCA9IHRtcDsKCQl9CgkJc2NhbmYoIiVkIiwgJmluKTsKCX0KfQoKdm9pZCBwcmludChOb2RlICpoZWFkKXsKCU5vZGUgKnA7CglwID0gaGVhZDsKCXdoaWxlKHApewoJCXByaW50Zigib3V0OiAlZFxuIiwgcC0+ZGF0YSk7CgkJcCA9IHAtPm5leHQ7Cgl9Cn0KCmludCBtYWluKCl7CglpbnQgcGF1c2U7CglOb2RlICpoZWFkID0gTlVMTDsKCWNyX2xpc3QoaGVhZCk7CglwcmludChoZWFkKTsKCXNjYW5mKCIlZCIsICZwYXVzZSk7Cn0=