stack
-
문제 번호 : 1662번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1662 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\r\n'); input = input[0].split(''); let arr = []; let front = 0; let answer = new Array(20).fill(0); for(let i in input){ if(input[i] === ')'){ let temp = ""; while(true)..
[BaekJoon] 1662 번 압축 문제 - (nodejs)문제 번호 : 1662번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1662 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\r\n'); input = input[0].split(''); let arr = []; let front = 0; let answer = new Array(20).fill(0); for(let i in input){ if(input[i] === ')'){ let temp = ""; while(true)..
2022.01.07 -
문제 번호 : 1406번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1406 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\n'); let front = input[0].split(''); let back = []; const num = Number(input[1]); let textlength = front.length; let arr = []; for(let i=0; i 0){ front.push(back.pop());..
[BaekJoon] 1406 번 에디터 문제 - (nodejs)문제 번호 : 1406번 문제 바로가기 ☞ https://www.acmicpc.net/problem/1406 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(filePath).toString().trim().split('\n'); let front = input[0].split(''); let back = []; const num = Number(input[1]); let textlength = front.length; let arr = []; for(let i=0; i 0){ front.push(back.pop());..
2022.01.05