diff --git a/javascript/source/printer.js b/javascript/source/printer.js index 2059560..e0b7fc5 100644 --- a/javascript/source/printer.js +++ b/javascript/source/printer.js @@ -2,6 +2,14 @@ let path = require('path'); let inputPath = path.join(__dirname, '/dev/stdin'); // __dirname은 현재 스크립트의 디렉토리 절대경로 let input = require('fs').readFileSync(inputPath).toString().trim().split('\n'); //'\r\n' //let input = require('fs').readFileSync('/dev/stdin').toString().trim().split('\n'); //백준 제출 +const board = input.map((el) => el.split(" ").map(Number)); // 숫자판 생성 +const uniqueNumbers = new Set(); // 중복 제거를 위한 Set +const directions = [ + [-1, 0], // 위 + [1, 0], // 아래 + [0, -1], // 왼쪽 + [0, 1], // 오른쪽 +]; let N = input.shift(); let arr = input[0].split(' ').map(el => +el); @@ -29,4 +37,4 @@ while (temp.length) { result[temp.pop()] = -1; } -console.log(result.join(' ')); \ No newline at end of file +console.log(result.join(' '));