목록문제/백준_자바스크립트 (91)
sm 기술 블로그
let input = require('fs').readFileSync(0).toString().trim().split("\n"); let NM = input[0].split(" ").map(Number) input.shift(); let whoIs = new Object(); names = []; result = []; cnt = 0 for(let i = 0; i 0){ cnt++; result.push(val..
let input = require("fs").readFileSync(0).toString().trim().split("\n"); let haveCard = input[1].split(" ").map(Number); let compareCard = input[3].split(" ").map(Number); let cardMap = new Object(); let result = ""; for (let i = 0; i 0) { cardMap[haveCard[i]]++; } else { cardMap[haveCard[i]] = 1; } } for (let val of compareCard) { if (cardMap..
let input = require('fs').readFileSync(0).toString().trim().split("\n"); let tmp = input[0].split(" ").map(Number); input.shift(); let PokemonDoGam_str = new Object(); let PokemonDoGam_num = new Object(); let Question = []; let result = "" for(let i =0;i
let input = require('fs').readFileSync(0).toString().trim().split("\n") let tmp = input[0].split(" ").map(Number) // tmp의 0은 N , 1은 M input.shift() let repositroy = new Set; let compare = []; let cnt = 0; for(let i = 0; i < tmp[0]; i++){ repositroy.add(input[i].trim()); } for(let j = tmp[0]; j < tmp[0]+tmp[1]; j++){ compare.push(input[j].trim()); } for(let val of compare){ if(repositroy.has(val)..