function solution(id_list, report, k) {
let reports = [...new Set(report)].map(a=>{return a.split(' ')});
// Set์ผ๋ก ๋ณํํ๋ค ํด๋น ์์๋ค์ ๋ค์ ๋ฐฐ์ด๋ก ๊ฐ์ ธ์ด ์ด๋ ๊ฐ ์์์ ๋ํด split์ ์งํ
let count = new Map();
for(const e of reports)
{
count.set(e[1], count.get(e[1]) + 1 || 1)
}
let note = new Map();
for (const report of reports)
{
if (count.get(report[1]) >= k)
{
note.set(report[0], note.get(report[0])+1 || 1)
}
}
let answer = id_list.map(a =>{
let data = note.get(a)
if (data === undefined)
{
return 0
}
else{
return data
}
});
return answer;
}