[BFS] 백준: 유기농 배추(Swift)
·
코테
난이도: 실버2 사용 언어: Swift 카테고리: BFS https://www.acmicpc.net/problem/1012 Code struct Queue { var memory = [T]() var index = 0 var isEmpty: Bool { memory.count T { let v = memory[index] index += 1 return v } } let t = Int(readLine()!)! var results = [Int]() for _ in 0.. Int { let mnk = readLine()!.sp..