[백준] 1260 : DFS와 BFS
const filePath = process.platform === "darwin" ? "input.txt" : "/dev/stdin";let input = require("fs").readFileSync(filePath).toString().split("\n");// let [n, m, v] = input[0].split(" ").map(Number);let [n, m, v] = input[0].split(" ").map((element) => { return Number(element);});const graph = [...Array(n + 1)].map(() => Array(n + 1).fill(0));const visited = Array(n + 1).fill(false);let dfsResul..
코딩문제풀기
2024. 4. 9. 00:59
최근에 올라온 글
- Total
- Today
- Yesterday
링크