14940번
백준 / 그래프 / 14940번 / 쉬운 최단거리 / JS
문제 간단설명지도가 주어지면, 각 칸에서 목표지점까지의 거리를 출력하는 문제이다.오직 가로와 세로로만 움직여 갈 수 있다. 제한 사항2 2 0은 갈 수 없는 땅이고 1은 갈 수 있는 땅, 2는 목표지점이다.입력에서 2는 단 한개이다. 실패 코드 (시간초과)const fs = require('fs');const filePath = process.platform === 'linux' ? '/dev/stdin' : '../input.txt';// const filePath = process.platform === 'linux' ? '/dev/stdin' : 'BOJ/input.txt';const input = fs .readFileSync(filePath) .toString() .trim() .spli..