#include <stdio.h>
#include <stdlib.h>
#define MAX 100000
  
typedef struct node * Node;
#define NIL NULL
 
int main(){
    int i,j,n;
    int A[MAX+1];
    scanf("%d",&n);
    for(i=1; i<n+1; i++){
        scanf("%d",&A[i]);
    }
    for(i=1;i<n+1;i++){
        printf("node %d: key = %d, ",i,A[i]);
        if(i>1)printf("parent key = %d, ",A[i/2]);
        if(i*2<n+1)printf("left key = %d, ",A[i*2]);
        if(i*2+1<n+1)printf("right key = %d, ",A[i*2+1]);
        printf("\n");
    }
}
Compile Error Logs:

Status
Judge: 4/4 	C 	CPU: 00:00 sec 	Memory: 2044 KB 	Length: 433 B 	2018-07-16 11:48
Results for testcases
Case # 	Verdict 	CPU Time 	Memory 	In 	Out 	Case Name
Case #1	: Accepted	00:00	1980	15	263	testcase_00
Case #2	: Accepted	00:00	2044	45	818	testcase_01
Case #3	: Accepted	00:00	2044	87	1562	testcase_02
Case #4	: Accepted	00:00	1980	729	13056	testcase_03
< prev | 		/ 		| next > 	  		
 
Judge Input #  ( | ) 		Judge Output #  ( | )

		


