#include<stdio.h> #include<stdlib.h> typedef struct num { int num; struct num *next; }link; link* create(int n,int a[]) { link* head,*now,*node; head =(link*)malloc(sizeof(link)); now=head; for(int i=0;i<n;i++) { node =(link*)malloc(sizeof(link)); node->num =a[i]; now->next=node; now =node; } return head; } void add_(int n,link* a,link* b) { int k; link*now,*new,*node,*nope; node =a->next; nope =b->next; for(int i=1;i<=n;i++) { now =node; new =nope; now->num+=new->num; node=node->next; nope=nope->next; } now=a->next; while(now!=NULL) { printf("%d ",now->num); now =now->next; } } int main() { int n; scanf("%d",&n); int a[n],b[n]; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } for(int j=0;j<n;j++) { scanf("%d",&b[j]); } link*c =create(n,a); link*d= create(n,b); add_(n,c,d); return 0; }