Language: C

#include <stdio.h>

#define LEFT   0
#define BOTTOM 1
#define RIGHT  2
#define TOP    3

typedef struct {
  int n, d;
  int x, y;
} s_square;

int main() {
  int n, x_min, y_min, x_max, y_max;
  s_square square[200];
  square[0] = {0};  //´_ðú»

  int i;
  while(1) {
    scanf("%d", &n);
    if(n == 0) { break; }

    for(i = 1; i < n; i ++) {
      scanf("%d %d", &square[i].n, &square[i].d);
    }

    x_min = y_min = x_max = y_max = 0;

    for(i = 1; i < n; i ++) {
      switch(square[i].d)
	case(LEFT) {
	  square[i].x = square[square.n].x - 1;
	  square[i].y = square[square.n].y
	  break;
	}
	case(BOTTOM) {
	  square[i].x = square[square.n].x
	  square[i].y = square[square.n].y - 1;
	  break;
	}
	case(RIGHT) {
	  square[i].x = square[square.n].x + 1;
	  square[i].y = square[square.n].y
	  break;
	}
	case(TOP) {
	  square[i].x = square[square.n].x
	  square[i].y = square[square.n].y + 1;
	  break;
	}

	//ÀW[ÌXV
	     if(square[i].x < x_min) { x_min = square[i].x; }
	else if(x_max < square[i].x) { x_max = square[i].x; }

	     if(square[i].y < y_min) { y_min = square[i].y; }
	else if(y_max < square[i].y) { y_max = square[i].y; }
    }

    printf("%d %d/n", x_max - x_min, y_max - y_min);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:15: error: expected expression before '{' token
   16 |   square[0] = {0};  //´_ðú»
      |               ^
main.c:31:20: error: expected ':' or '...' before '{' token
   31 |         case(LEFT) {
      |                    ^
main.c:32:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   32 |           square[i].x = square[square.n].x - 1;
      |                                      ^
      |                                      ->
main.c:33:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   33 |           square[i].y = square[square.n].y
      |                                      ^
      |                                      ->
main.c:33:43: error: expected ';' before 'break'
   33 |           square[i].y = square[square.n].y
      |                                           ^
      |                                           ;
   34 |           break;
      |           ~~~~~                            
main.c:36:22: error: expected ':' or '...' before '{' token
   36 |         case(BOTTOM) {
      |                      ^
main.c:37:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   37 |           square[i].x = square[square.n].x
      |                                      ^
      |                                      ->
main.c:37:43: error: expected ';' before 'square'
   37 |           square[i].x = square[square.n].x
      |                                           ^
      |                                           ;
   38 |           square[i].y = square[square.n].y - 1;
      |           ~~~~~~                           
main.c:41:21: error: expected ':' or '...' before '{' token
   41 |         case(RIGHT) {
      |                     ^
main.c:42:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   42 |           square[i].x = square[square.n].x + 1;
      |                                      ^
      |                                      ->
main.c:43:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   43 |           square[i].y = square[square.n].y
      |                                      ^
      |                                      ->
main.c:43:43: error: expected ';' before 'break'
   43 |           square[i].y = square[square.n].y
      |                                           ^
      |                                           ;
   44 |           break;
      |           ~~~~~                            
main.c:46:19: error: expected ':' or '...' before '{' token
   46 |         case(TOP) {
      |                   ^
main.c:47:38: error: '(s_square *)&square' is a pointer; did you mean to use '->'?
   47 |           square[i].x = square[square.n].x
      |                                      ^
      |                                      ->
main.c:47:43: error: expected ';' before 'square'
   47 |           square[i].x = square[square.n].x
      |                                           ^
      |                                           ;
   48 |           square[i].y = square[square.n].y + 1;
      |           ~~~~~~