func solution(_ id_list:[String], _ report:[String], _ k:Int) -> [Int] {
    var result = Array(repeating: 0, count: id_list.count)
    var arr: [String: [String]] = [:]
    let reportSet = Set<String>(report)
    for repo in reportSet {
        let str = repo.split(separator: " ")
        if (arr[String(str[1])] != nil) {
            arr[String(str[1])]?.append(String(str[0]))
        } else {
            arr[String(str[1])] = [String(str[0])]
        }
    }
    let dics = arr.filter { $0.value.count >= k }
    for dic in dics {
        for id in dic.value {
            result[id_list.firstIndex(of: id)!] += 1
        }
    }
    return result
}