Language: C

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#define VD void
#define U4 unsigned int
#define U1 unsigned char
#define S4 int

/* ---------- ?????°?????? ------------ */
#define MAX_COUNT_ROUTER	(100)		/* ?????????????????§??° */
#define MAX_CNT_PACKET		(1000)		/* PACKET????????§??° */

#define NOT_CONNECTED		(0)			/* ???????????\?¶??????? */
#define IS_CONNECTED		(1)			/* ???????????\?¶??????? */
#define END_SEARCH			(-1)		/* ??¢?´¢????±???????????????? */

#define IS_COMPLETE			(1)			/* ??¢?´¢?????? */
#define	NOT_COMPLETE		(0)			/* ??¢?´¢????????? */

#define NA					(-1)		/* #NA */



S4 main()
{
	/* ---------- ?????°?????? ---------- */
	U4 u4_t_numRouter;		/* ?????????????????? */
	U1 u1_t_delimiter;		/* ??????????????? */
	S4 s4_t_TTL;			/* TTL */
	S4 s4_t_srcRouter;		/* ???????????????????????? */
	S4 s4_t_dstRouter;		/* ????????????????????? */

	S4 s4_tp_connectedRouter[MAX_COUNT_ROUTER + 1][MAX_COUNT_ROUTER + 1] = { 0 };		/* ???????????\?¶??????±???????????????????´???????????????? */
	S4 s4_tp_searchRouter[MAX_COUNT_ROUTER + 1];										/* ??¢?´¢????±???????????????? */
	S4 s4_tp_nextSearchRouter[MAX_COUNT_ROUTER];										/* ?¬??????¢?´¢????±???????????????? */
	S4 s4_tp_result[MAX_CNT_PACKET];													/* ??????????´???¨?????? */

	U1 u1_t_isComplete;		/* ??¢?´¢??????????????° */

	/* ---------- ???????????° ---------- */
	U4 u4_t_routerNumber;	/* ??????????????? */
	U4 u4_t_cntPacket;		/* ?????±????????° */
	S4 s4_t_searchRouter;	/* ??¢?´¢????±???????????????? */
	S4 s4_t_nextSearchRouterIndex;	/* ?¬??????¢?´¢????±????????????????????´???¨?????????????????? */

	/* ---------- ???????????? ---------- */
	U4 u4_t_ri;			/* ???????????\?¶??????±????´?????????? */
	U4 u4_t_pi;			/* ?????±???????????±????´?????????? */
	S4 s4_t_hop;		/* ???????????°(?????????????????±??°) */
	S4 s4_t_si;			/* ??¢?´¢??¨????????? */
	U4 u4_t_ni;			/* ?¬??????¢?´¢????±????????????????????´???¨????????? */
	U4 u4_t_ci;			/* ??¢?´¢????±???????????????????????????¨????????? */
	S4 s4_t_oi;			/* ??????????????¨????????????????????? */
	S4 s4_t_oi2;		/* ??????????????¨????????????????????? */

	/* ??????????????°?????\??? */
	scanf("%d%c", &u4_t_numRouter, &u1_t_delimiter);

	/* ---------- ??????????????\?¶??????±?????\??? ---------- */
	for (u4_t_ri = (U4)1; u4_t_ri <= u4_t_numRouter; u4_t_ri++) {
		u1_t_delimiter = ' ';
		/* ???????????????????????\?¶??????±?????????????????? */
		while (u1_t_delimiter != '\n') {
			scanf("%d%c", &u4_t_routerNumber, &u1_t_delimiter);
			s4_tp_connectedRouter[u4_t_ri][u4_t_routerNumber] = (S4)IS_CONNECTED;
		}
	}

	/* ---------- ??¢?´¢ ---------- */
	scanf("%d%c", &u4_t_cntPacket, &u1_t_delimiter);

	/* ?????????????????±????´????????????????????????? */
	s4_t_oi = (S4)0;

	/* ?????±???????????°????????¢?´¢????????? */
	for (u4_t_pi = (U4)0; u4_t_pi < u4_t_cntPacket; u4_t_pi++) {
		/* ???????????????????????????????????????????????????TTL?????\??? */
		scanf("%d %d %d%c", &s4_t_srcRouter, &s4_t_dstRouter, &s4_t_TTL, &u1_t_delimiter);

		/* 1???????????¢?´¢????????????????????´??\????????£????????????????¢?????????? */
		s4_tp_searchRouter[0] = s4_t_srcRouter;
		s4_tp_searchRouter[1] = (S4)END_SEARCH;

		u1_t_isComplete = (U1)NOT_COMPLETE;

		s4_t_hop = (S4)2;
	
		/* ???????????°???TTL????¶???????????????¢?´¢????????????????????§??¢??? */
		while ((s4_t_hop <= s4_t_TTL) &&
			   (u1_t_isComplete != (U1)IS_COMPLETE)) {

			s4_t_si = (S4)0;
			/* ??¢?´¢????±?????????????????????????????????¢?´¢????????????????????§??¢??? */
			while ((s4_tp_searchRouter[s4_t_si] != (S4)END_SEARCH) &&
				  (u1_t_isComplete != (U1)IS_COMPLETE)) {

				/* ??¢?´¢????±????????????¨????????????????????´??\????????£?????????????¢???? */
				s4_t_searchRouter = s4_tp_searchRouter[s4_t_si];
				if (s4_tp_connectedRouter[s4_t_searchRouter][s4_t_dstRouter] == (S4)IS_CONNECTED) {
					u1_t_isComplete = (U1)IS_COMPLETE;
				}

				/* ?????¨?????¢?´¢????±??????????????????´??\????????£?????????????????? = ?¬??????¢?´¢????±?????????? */
				if (u1_t_isComplete != (U1)IS_COMPLETE) {
					for (u4_t_ni = (U4)0; u4_t_ni <= u4_t_numRouter; u4_t_ni++) {
						if (s4_tp_connectedRouter[s4_t_searchRouter][u4_t_ni] == (S4)IS_CONNECTED) {
							s4_tp_nextSearchRouter[u4_t_ni] = (S4)IS_CONNECTED;
						}
					}
				}
				s4_t_si++;
			}

			if (u1_t_isComplete != (U1)IS_COMPLETE) {
				/* ??¢?´¢????±????????????????????????£???????????????????????¨???????????????????????§??????????????°????¢??????? */
				s4_t_hop++;
			}

			/* ?¬??????¢?´¢????±???????????????¢?´¢????±?????????????????????? */
			s4_t_nextSearchRouterIndex = (S4)0;
			for (u4_t_ci = (U4)0; u4_t_ci < u4_t_numRouter; u4_t_ci++) {
				if (s4_tp_nextSearchRouter[u4_t_ci] == (S4)IS_CONNECTED) {
					s4_tp_searchRouter[s4_t_nextSearchRouterIndex] = u4_t_ci;
					s4_t_nextSearchRouterIndex++;
					/* ????????? */
					s4_tp_nextSearchRouter[u4_t_ci] = (S4)NOT_CONNECTED;
				}
			}
			s4_tp_searchRouter[s4_t_nextSearchRouterIndex] = (S4)END_SEARCH;
		}

		/* TTL??\????????°?????§????????´??? */
		if (u1_t_isComplete == (U1)IS_COMPLETE) {
			s4_tp_result[s4_t_oi] = s4_t_hop;
		}
		else {
			s4_tp_result[s4_t_oi] = NA;
		}
		s4_t_oi++;
	}

	/* ???????????? */
	for (s4_t_oi2 = (S4)0; s4_t_oi2 < s4_t_oi; s4_t_oi2++) {
		if (s4_tp_result[s4_t_oi2] == (S4)NA) {
			printf("NA");
		}
		else {
			printf("%d", s4_tp_result[s4_t_oi2]);
		}

		/* ????????\?????????????????? */
		if (s4_t_oi2 != s4_t_oi - 1) {
			printf("\n);
		}
	}

	return((U4)0);

}

Compiler output:
main.c: In function 'main':
main.c:154:32: warning: missing terminating " character
  154 |                         printf("\n);
      |                                ^
main.c:154:32: error: missing terminating " character
  154 |                         printf("\n);
      |                                ^~~~~
main.c:155:17: error: expected expression before '}' token
  155 |                 }
      |                 ^
main.c:154:32: error: expected ';' before '}' token
  154 |                         printf("\n);
      |                                ^
      |                                ;
  155 |                 }
      |                 ~