본문 바로가기 메뉴 바로가기

개발 REPO

프로필사진

개발 REPO

개발 REPO
검색하기 폼 Mountain View
  • 분류 전체보기 (66)
    • 우아한 에자일 (2)
      • 발표 (2)
    • 알고리즘 (31)
      • level 1 (12)
      • level2 (5)
      • 개념 (0)
      • 백준 (8)
      • SQL (6)
    • 코딩언어 (9)
      • java (0)
      • javascript (9)
      • python (0)
    • 알면 조흔 지식 (2)
    • 백엔드 (10)
      • node.js공부 (10)
    • 프론트엔드 (0)
    • 개발노트 (3)
    • DB (3)
      • AWS (3)
      • MYSQL (0)
      • MONGODB (0)
  • GUESTBOOK
  • TAG
  • RSS

알고리즘/백준
백준 7562 [nodejs] 나이트의 이동

const line = require("fs").readFileSync("/dev/stdin", "utf8"); let input = line.trim().split("\n"); let map = []; let destination = []; let result = 0; let size = 0; //나이트가 이동할 수 있는 경우의 수 const moves = [ [-2, -1], [-2, 1], [2, -1], [2, 1], [-1, -2], [-1, 2], [1, -2], [1, 2], ]; chess(); function chess() { test = parseInt(input.splice(0, 1)); for (i = 0; i < test; i++) { let cnt = 0; size = parse..

알고리즘/백준 2021. 2. 4. 09:38
백준 7569 [nodejs] 토마토 3차원버전

const line = require("fs").readFileSync("/dev/stdin", "utf8"); let input = line.trim().split("\n"); //3차원이므로 dz부분을 추가하고 위,아래,동,서,남,북 6가지로 나타내었다. const dx = [1, -1, 0, 0, 0, 0]; const dy = [0, 0, 1, -1, 0, 0]; const dz = [0, 0, 0, 0, 1, -1]; const [m, n, h] = input[0].split(" ").map(Number); input.splice(0, 1); let totalBox = []; let tomatos = []; let queue = []; let zero = 0; let cnt = 0; minimu..

알고리즘/백준 2021. 2. 4. 09:30
백준 7576 [nodejs] 토마토

const line = require("fs").readFileSync("/dev/stdin", "utf8"); let input = line.trim().split("\n"); const dx = [1, -1, 0, 0]; const dy = [0, 0, 1, -1]; const [m, n] = input[0].split(" ").map(Number); let tomatos = []; let queue = []; let zero = 0; let cnt = 0; minimumDate(); function minimumDate() { //토마토밭을 만드는 for문 for (let i = 1; i < n + 1; i++) { tomatos.push(input[i].split(" ").map(Number));..

알고리즘/백준 2021. 2. 4. 09:26
백준2178[nodejs] 미로 탐색

const readline = require("readline"); let input = []; let maze = []; const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => input.push(line.trim())).on("close", () => { //현재위치 1,1 //큐에 아래, 옆 1이면 저장 //아래부터 시작해서 //아래 위 const [n, m] = input[0].split(" ").map(Number); input.splice(0, 1); for (let i = 0; i < n; i++) { maze.push(input[i].split("..

알고리즘/백준 2021. 2. 4. 00:45
백준1012[nodejs]유기농 배추

const readline = require("readline"); let input = []; let cabbageField = []; let result = []; const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => input.push(line.trim())).on("close", () => { const test = parseInt(input[0]); input.splice(0, 1); //여러 밭이 나올 수 있어 for문으로 반복 for (let repeat = 0; repeat < test; repeat++) { let count = 0; const..

알고리즘/백준 2021. 2. 4. 00:42
백준2667[nodejs]단지번호붙이기

const readline = require("readline"); let input = []; let map = []; let result = []; let [total, count] = [0, 0]; const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => input.push(line.trim())).on("close", () => { const size = parseInt(input[0]); input.splice(0, 1); for (let i of input) { map.push(i.split("").map(Number)); } // 위는 입력받는 코드 ..

알고리즘/백준 2021. 2. 4. 00:39
백준2606[nodejs] 바이러스

const readline = require("readline"); let input = []; let arr = []; let visited = []; let infection = []; const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => input.push(line.trim())).on("close", () => { const [computers, pairs] = [parseInt(input[0]), parseInt(input[1])]; input.splice(0, 2); arr = Array.from(Array(computers + 1), () => A..

알고리즘/백준 2021. 2. 4. 00:34
백준1260[nodejs] DFS와 BFS

const readline = require("readline"); let arr = []; let dfsVisited = []; let bfsVisited = []; let dfsResult = []; let bfsResult = []; let input = []; // readline안에서는 배열을 let으로 선언 const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => input.push(line.trim())).on("close", () => { const [n, m, v] = input[0].split(" ").map(Number); input = inp..

알고리즘/백준 2021. 2. 3. 23:44
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
TAG
  • GROUP BY
  • nodemailer error
  • 숫자야구게임
  • nodejs
  • 토마토3차원
  • 백준 7569 node
  • tolowercase
  • 코딩테스트
  • Split
  • 회원가입
  • smtp error
  • sort
  • 로그인
  • slice
  • 카카오2018[1차]
  • Level 1
  • Express
  • 바이러스 dfs
  • SQL
  • AWS
  • Replace
  • 백준
  • 정규표현식
  • 백준 7562 node
  • JavaScript
  • left join
  • JOIN
  • 534 error
  • 프로그래머스
  • 코드테스트
more
Total
Today
Yesterday

Powered by Tistory / Designed by INJE

티스토리툴바