Swift 5 | 코테/백준 | 골드 - 문제풀이
DP(2-2) 문제 풀이 모음 | 백준 Swift 1520번, 2056번, 1695번, 21923번,
// MARK: - 1520번(DFS) let input = readLine()!.split(separator: " ").map{Int(String($0))!} let (M, N) = (input[0], input[1]) var arr: [[Int]] = Array(repeating: [], count: M + 1) arr[0] = Array(repeating: 0, count: N + 1) for i in 1...M { arr[i] = [0] + readLine()!.split(separator: " ").map{Int(String($0))!} } //var dp: [[Int]] = Array(repeating: Array(repeating: -1, count: N + 1), count: M + 1) ..
2022. 6. 3. 22:14
최근댓글