tree.c:8:5: error: unknown type name 'Node'
Node*next;
^~~~
tree.c:13:5: error: unknown type name 'Node'
Node*now;
^~~~
tree.c:14:5: error: unknown type name 'Node'
Node* hasNext(){
^~~~
tree.c:14:20: error: expected ':', ',', ';', '}' or '__attribute__' before '{' token
Node* hasNext(){
^
tree.c: In function 'push_adj':
tree.c:25:17: error: expected expression before '{' token
buf[bCnt] = {e, adj[s].next};
^
tree.c:26:17: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
adj[s].next = buf + bCnt++;
^
tree.c: In function 'reGroup':
tree.c:31:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
for(Node*p = adj+k;p->next;){
^~~~
struct
tree.c:31:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
for(Node*p = adj+k;p->next;){
^~~
tree.c:31:25: error: request for member 'next' in something not a structure or union
for(Node*p = adj+k;p->next;){
^~
tree.c:32:18: error: request for member 'next' in something not a structure or union
if(used[p->next->node]){
^~
tree.c:33:14: error: request for member 'next' in something not a structure or union
p->next = p->next->next;
^~
tree.c:33:24: error: request for member 'next' in something not a structure or union
p->next = p->next->next;
^~
tree.c:36:22: error: request for member 'next' in something not a structure or union
reGroup(p->next->node);
^~
tree.c:37:18: error: request for member 'next' in something not a structure or union
p = p->next;
^~
tree.c: In function 'split':
tree.c:50:18: error: expected expression before '{' token
xQue[xe++] = {adj+a};
^
tree.c:51:18: error: expected expression before '{' token
yQue[ye++] = {adj+b};
^
tree.c:53:33: error: 'struct Queue' has no member named 'hasNext'
while(xf<xe && !xQue[xf].hasNext())
^
tree.c:57:22: error: expected expression before '{' token
xQue[xe++] = {adj + xQue[xf].now->node};
^
tree.c:59:33: error: 'struct Queue' has no member named 'hasNext'
while(yf<ye && !yQue[yf].hasNext())
^
tree.c:65:22: error: expected expression before '{' token
yQue[ye++] = {adj + yQue[yf].now->node};
^
tree.c: In function 'main':
tree.c:80:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &N, &Q);
^~~~~~~~~~~~~~~~~~~~~~
tree.c:83:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &b);
^~~~~~~~~~~~~~~
tree.c:89:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &b, &c, &d);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~