목록바킹독 알고리즘/BFS (2)
쥐수의 공부노트

정답 : let num = readLine()!.split(separator: " ").map { Int($0)! } let row = num[0] let col = num[1] var array: [[Int]] = [] var visited = Array(repeating: Array(repeating: false, count: col), count: row) var queue: [(Int, Int)] = [] var count = 0 for _ in 0..
바킹독 알고리즘/BFS
2023. 9. 11. 19:09

정답 : import Foundation // 1926번 let num = readLine()!.split(separator: " ").map{Int($0)!} let row = num[0] let col = num[1] var array = [[Int]]() var queue = [(Int,Int)]() var visited = Array(repeating: Array(repeating: false, count: col), count: row) var count = 0 var big = 0 for _ in 0..
바킹독 알고리즘/BFS
2023. 9. 11. 13:55