자스
-
문제 번호 : 24998 번 문제 바로가기 ☞ https://www.acmicpc.net/problem/24498 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; const input = fs.readFileSync(filePath).toString().trim().split("\n"); const N = input[0]; const block = input[1].split(" ").map(Number); const answer = [block[0], block[block.length - 1]]; for (let i = 1; i < block.length - 1; i+..
[BaekJoon] 24998 번 blobnom 문제 - (nodejs)문제 번호 : 24998 번 문제 바로가기 ☞ https://www.acmicpc.net/problem/24498 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; const input = fs.readFileSync(filePath).toString().trim().split("\n"); const N = input[0]; const block = input[1].split(" ").map(Number); const answer = [block[0], block[block.length - 1]]; for (let i = 1; i < block.length - 1; i+..
2022.02.24 -
문제 번호 : 2206 문제 바로가기 ☞ https://www.acmicpc.net/problem/2206 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().trim().split("\r\n"); const dy = [-1, 1, 0, 0]; const dx = [0, 0, -1, 1]; const [by, bx] = input[0].split(" ").map(Number); let visited = Array.from(Array(by), () => Array.from(Array(bx..
[BaekJoon] 2206 번 벽 부수고 이동하기 문제 - (nodejs)문제 번호 : 2206 문제 바로가기 ☞ https://www.acmicpc.net/problem/2206 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().trim().split("\r\n"); const dy = [-1, 1, 0, 0]; const dx = [0, 0, -1, 1]; const [by, bx] = input[0].split(" ").map(Number); let visited = Array.from(Array(by), () => Array.from(Array(bx..
2022.02.07 -
문제 번호 : 4889번 문제 바로가기 ☞ https://www.acmicpc.net/problem/4889 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\n'); for(let i in input){ let temp = input[i].split(''); let arr = []; let cnt = 0; if(temp[0] === '-') break; for(let j in temp){ if(temp[j] === '{'){ arr.push(temp[j])..
[BaekJoon] 4889 번 안정적인 문자열 문제 - (nodejs)문제 번호 : 4889번 문제 바로가기 ☞ https://www.acmicpc.net/problem/4889 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\n'); for(let i in input){ let temp = input[i].split(''); let arr = []; let cnt = 0; if(temp[0] === '-') break; for(let j in temp){ if(temp[j] === '{'){ arr.push(temp[j])..
2022.01.07