Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions YooGyeongMo/DFS:BFS/๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
//
// main.swift
//
// Created by Demian Yoo on 4/16/25.
//

// 1.์ƒํ•˜์ขŒ์šฐ ์ค‘์— 0์ธ์นธ (์ฒญ์†Œ๊ฐ€ ๋˜์ง€์•Š์€ ์นธ)์ด ์—†๋Š” ๊ฒฝ์šฐ.
// ํ˜„์žฌ ๋ฐฉํ–ฅ ์œ ์ง€ 1์นธ ๋’ค๋กœ ์ด๋™
// 0์ธ์นธ ๋งŒ๋‚˜๋ฉด 1๋กœ ๋ฐ”๊พธ๊ธฐ
// ๋’ค๋กœ ๋ชป ๊ฐ€๋ฉด(1์ธ ๊ฒฝ์šฐ) ์ž‘๋™ ๋ฉˆ์ถ”๊ธฐ -> ์ž‘๋™ ๋ฉˆ์ถ”๋Š” ์กฐ๊ฑด ํ•ด๋‹น ์ขŒํ‘œ ๋ฑ‰์–ด์•ผํ•จ.

// 2.์ƒํ•˜์ขŒ์šฐ ์ค‘์— 0์ธ ์นธ์ด ์žˆ๋Š” ๊ฒฝ์šฐ.
// ์™ผ์ชฝ์œผ๋กœ 90๋„ ํšŒ์ „ํ•œ๋‹ค.
// ์•ž ์นธ์ด 0์ผ ๊ฒฝ์šฐ, ์•ž์œผ๋กœ 1์นธ ์ด๋™ํ•˜๊ณ  1๋กœ ๋ฐ”๊พผ๋‹ค.
// 1๋กœ ๋Œ์•„๊ฐ„๋‹ค. (์ƒํ•˜์ขŒ์šฐ ํƒ์ƒ‰)

// x,y ์ขŒํ‘œ ๋ถ๋™๋‚จ์„œ

import Foundation
// ๋ถ๋™๋‚จ์„œ
let dx = [0,1,0,-1]
let dy = [-1,0,1,0]

// MARK: ๋ณด๋“œ ์‚ฌ์ด์ฆˆ ์ž…๋ ฅ ์ตœ์†Œ 3์ด์ƒ ์ตœ๋Œ€ 50์ดํ•˜.
let boardSize = readLine()!.split(separator: " ").map { Int($0)! }
let (N,M) = (boardSize[0], boardSize[1])
Comment on lines +24 to +26
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ž…๋ ฅ ์กฐ๊ฑด ์ฃผ์„์œผ๋กœ ์ ์–ด๋†“์œผ์‹œ๋Š”๊ฑฐ ๊ต‰์žฅํžˆ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค!! ์ €๋„ ์ด๋ ‡๊ฒŒ ํ•ด์•ผ๊ฒ ์–ด์š”^~^

+ ์ž…๋ ฅ ๋ถ€๋ถ„ ๊ฐ€์ ธ๋‹ค์ผ์–ด์šฉ!


// MARK: ์ฒญ์†Œ๊ธฐ ์‹œ์ž‘ ์ขŒํ‘œ ์ž…๋ ฅ
let robotInfo = readLine()!.split(separator: " ").map { Int($0)! }
let (r,c,d) = (robotInfo[0], robotInfo[1], robotInfo[2])

// MARK: ๋ณด๋“œ ์„ ์–ธ
var board: [[Int]] = []


// MARK: ๋ณด๋“œ ์ดˆ๊ธฐํ™”
for _ in 0..<N {
let row = readLine()!.split(separator: " ").map{ Int($0)! }
board.append(row)
}

// ์™ผ์ชฝ90๋„๋Š” ์˜ค๋ฅธ์ชฝ์œผ๋กœ +3
func turnLeft(from direction: Int) -> Int {
return (direction + 3) % 4
}

func dfs( _ count: Int, _ nowDir: Int,_ x: Int, _ y:Int) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์†Œํ•œ ์งˆ๋ฌธ๊ฐ™๊ธฐ๋„ ํ•œ๋ฐ ๊ถ๊ธˆํ•ด์„œ ์—ฌ์ญค๋ณผ๊ฒŒ์š”!

์ด ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ 4๊ฐœ์ธ ํ•จ์ˆ˜๋ฅผ ๋ดค์„ ๋•Œ, ๋ฐ๋ฏธ์•ˆ์€ ์–ด๋–ค ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ๊ฐ€์žฅ ์ค‘์š”ํ•˜๋‹ค๊ณ  ์ƒ๊ฐ์ด ๋“œ์‹œ๋‚˜์š”?
์ €๋Š” ๋ญ”๊ฐ€ x,y๋ฅผ ์•ž์— ๋‘๋Š”๊ฒŒ ์–ด๋–ค๊ฐ€? ํ•˜๋Š” ๊ฐ€๋ฒผ์šด ์ƒ๊ฐ์ด ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค!
๊ฐ‘์ž๊ธฐ ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์ˆœ์„œ์— ๋”ฐ๋ผ์„œ๋„ ํ•จ์ˆ˜๋ฅผ ์ดํ•ดํ•˜๋Š” ๊ฐ€๋…์„ฑ์„ ์กฐ๊ธˆ ๋” ๋†’์ผ ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ? ํ•˜๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ๋„ค์š” ใ…‹ใ…‹
๋ฌผ๋ก  ์ง€๊ธˆ๋„ ์ถฉ๋ถ„ํžˆ ์ดํ•ด๋˜๋Š” ์ˆœ์„œ์ž…๋‹ˆ๋‹ค !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ข‹์€ ํ”ผ๋“œ๋ฐฑ์ด๋„ค์š” ๊ธธ ์ €๋„ ๊ทธ๋Ÿฐ ์ƒ๊ฐ์ด ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator

@bishoe01 bishoe01 May 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ข‹์€ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค..! ์ €๋Š” ๋ณต์žกํ• ์ˆ˜๋ก ํŒŒ๋ผ๋ฏธํ„ฐ ์ˆœ์„œ์—์„œ ๋’ค๋กœ ๋ฏธ๋ฃจ๋Š” ๊ฒƒ ๊ฐ™์•„์š”.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giljihun ์‚ฌ์‹ค ๊ธธ ์ด์•ผ๊ธฐ๋ฅผ ๋“ฃ๊ณ  ๋ณด๋‹ˆ... ํ•จ์ˆ˜ ํŒŒ๋ผ๋ฏธํ„ฐ ์„ ์ •์‹œ์— ์ค‘์š”๋„ ํ˜น์€, ๊ฐ€๋…์„ฑ์„ ์ƒ๊ฐํ•˜์ง€ ์•Š๋Š” ๊ฒฝํ–ฅ์ด ์žˆ๋Š”๊ฑฐ ๊ฐ™์•„์š” ใ…œใ…œ ๋ฐ˜์„ฑํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์‚ฌ์‹ค ์ค‘์š”๋„ ์ธก๋ฉด์—์„œ ์ƒ๊ฐํ•˜๊ธฐ ๋ณด๋‹ค๋Š” ์„ค๊ณ„ํ• ๋•Œ ์ผ๋‹จ ๊ตฌํ˜„ํ•˜๊ณ  ๋ณด์ž๋ผ๋Š” ์ƒ๊ฐ์œผ๋กœ ํ•จ์ˆ˜์— ๋‹ค ๋•Œ๋ ค๋„ฃ์„๋•Œ ํŠนํžˆ dfs/bfs ํ’€๋•Œ๋Š” ๊ทธ๋ƒฅ ๋„ฃ๊ฒŒ ๋˜๋Š”๋ฐ ๋งž๋„ค์š”.. ์ƒ๊ฐํ•ด๋ณด๋‹ˆ x,y๊ฐ€ ์•ž์—์žˆ๋‹ค๋ฉด ? ์•„์ฃผ ์ข‹์•˜์„๊บผ๊ฐ™์•„์š”.

  • ๋‹ค๋งŒใ…‹ใ…‹ dfs/bfs๋ฌธ์ œ ํ‘ผ๊ฑธ๋ณด๋‹ˆ ์žฌ๊ท€์ผ๋•Œ ์ขŒํ‘œ๋Š” ๋’ค์ชฝ์— ์ฐ๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ๋”๊ตฐ์š” ์ €๋Š” ์ƒ๊ฐํ•˜๊ณ  ์ ์–ด๋ด์•ผ๊ฒ ์–ด์š” ๊ธธ ์„ผ์„ธ์™€ swift ์ปจ๋ฒค์…˜keeper @MuchanKim ์กฐ์–ธ์ด๋ผ๋ฉด ๋ฐ›์„์–ด์•ผ์ฃ  ํ˜ธํ˜ธ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค.. ๊ทธ๋ ‡๊ตฐ์š” ใ…Žใ…Ž
์ €๋„ ๋ฐ˜์„ฑํ•˜๋Š” ๋ถ€๋ถ„์ด๋ผ ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ฒจ๋ณด์•˜๋˜ ๊ฒƒ์ž…๋‹ˆ๋‹ค !! ๊ฐ์‚ฌํ•ด์š”


// 1. ํ˜„์žฌ ์œ„์น˜๊ฐ€ ์ฒญ์†Œ๋˜์ง€ ์•Š์•˜๋‹ค๋ฉด -> ์ฒญ์†Œ
if board[y][x] == 0 {
board[y][x] = 2
}

var d = nowDir

for i in 0..<4{
// ์™ผ์ชฝ์œผ๋กœ ํ•œ๋ฒˆ ํšŒ์ „
d = turnLeft(from: d)
let nx = x + dx[d]
let ny = y + dy[d]

if ny < 0 || ny >= N || nx < 0 || nx >= M { continue }

//0์ธ ์นธ์ด ์•„๋‹ˆ์–ด๋„ ๋‹ค์Œ index๋กœ ๋„˜์–ด๊ฐ
if board[ny][nx] != 0 { continue }

// ์ฒญ์†Œ
board[ny][nx] = 2

//๋‹ค์Œ ์‹คํ–‰
dfs(count + 1, d, nx, ny)
return
}
Comment on lines +56 to +73
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฌธ์ œ๊ฐ€ ์—„์ฒญ ๋ณต์žกํ•˜๋‹ค๊ณ  ์ƒ๊ฐ์„ ํ–ˆ๋Š”๋ฐ, ์ด๋ ‡๊ฒŒ dfs๋กœ ์ •๋ฆฌ๋œ๊ฒƒ ๋ณด๋‹ˆ๊นŒ ํ›„์ง„์„ ๋’ค๋กœ ๋นผ์ฃผ๋ฉด turnleft์žˆ๋Š” ๊น”๋”ํ•œ dfs๋„ค์š” ์ž˜๋ดค์Šต๋‹ˆ๋‹ค ~ ๊ทธ๋ฆฌ๊ณ  ์ด ๋ฒ”์œ„ ์ฒ˜๋ฆฌ ํ•ด์ฃผ๋Š” ๊ฒƒ์€ ์‚ฌ๋žŒ๋งˆ๋‹ค ๋‹ค์–‘ํ•˜๋„ค์š” isRange ํ•จ์ˆ˜๋กœ ์•ˆ๋นผ์ฃผ๊ณ  ๊ทธ๋ƒฅ continue ๋ฐ”๋กœ ํ•ด์ฃผ๋‹ˆ๊นŒ ๊ฐ„๊ฒฐํ•ด์„œ ๋ณด๊ธฐ ์ข‹์•„์š” ๋‹ค์Œ์— ํ•œ ๋ฒˆ ์‚ฌ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bishoe01 ๋งž์•„์š” ํ•€์Œค ์ €๊ธฐ์„œ ์ €๋Š” ์ข€ ๊ณ ๋ฏผํ–ˆ์–ด์š” ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋Œ์ง€ ์™ผ์ชฝ์œผ๋กœ ๋Œ์ง€ ์•„๋‹ˆ๋ฉด ๋ญ ์–ด๋–ค์‹์œผ๋กœํ•ด์•ผ ์ข€ ๋” ํšจ์œจ์ ์œผ๋กœ ๊ณ„์‚ฐํ• ์ง€, ์‚ฌ์‹ค ์ € ์ฝ”๋“œ๋Š” ์ œ๊ฐ€ ์ด๊ฒƒ์ด ์ฝ”๋”ฉํ…Œ์ŠคํŠธ๋‹ค ๋‚˜๋™๋นˆ ์ฑ…์—์„œ dfs/bfs ์‹œ์— ์ €๋Ÿฐ์‹์œผ๋กœ ๋งŽ์ด์ฒดํฌ๋ฅผ ๋จผ์ €ํ•˜๊ณ  ํ›„์— ์กฐ๊ฑด์„ ๋„ฃ๊ณ  dfs ์‹คํ–‰ํ•˜๋Š” ์ˆœ์„œ๋ฅผ ๊ฐ€์ ธ์„œ ๊ทธ ๊ตฌ์กฐ๋ฅผ ์™ธ์› ์–ด์„œ ๊ทธ๋Ÿฐ๊ฑฐ๊ฐ™์•„์š”. ์ข€ ๋” ์ข‹์€ ๋ฐฉ์‹์ด ์žˆ์œผ๋ฉด ์•Œ๋ ค์ฃผ์‹œ๋ฉด ์ข‹์„๊บผ๊ฐ™์•„์š” ํ•€์Œค

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—„~์ฒญ ์˜ˆ์ „์—๋ณด๊ณ  ๋ณธ์ ์ด์—†๋„ค์š”...!
์ฑ…์€ ๊ฐ€์ ธ์™”์–ด์š”!! ์˜ค๋Š˜๊ฐ€์„œ ํ•œ ๋ฒˆ ๋‘˜๋Ÿฌ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ๊ฐ์‚ฌํ•ด์š”


// 2. 4๋ฐฉํ–ฅ ๋ชจ๋‘ ์ฒญ์†Œ ๋ถˆ๊ฐ€ ํ›„์ง„
let back = (nowDir + 2) % 4
let bx = x + dx[back]
let by = y + dy[back]

Comment on lines +76 to +79
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dใ…˜ ๋ฐ๋ฏธ์•ˆ ์ด๋ ‡๊ฒŒ ์ ‘๊ทผํ•˜์…งใ„ฑใ„ด์š” !


// ๋’ค๋กœ ์ด๋™ํ•˜๋ ค๋Š” ์นธ์ด 1์ธ ๊ฒฝ์šฐ (๋ฒฝ์ด๋ผ ์ด๋™ ๋ถˆ๊ฐ€)
// ํ˜„์žฌ๊นŒ์ง€์˜ ๊ฐ’์„ ์ถœ๋ ฅํ•˜๊ณ  ์ข…๋ฃŒํ•จ
// 1์ด ์•„๋‹ˆ๋ผ๋ฉด ๋’ค๋กœ ์ด๋™ํ•˜์—ฌ dfs ์‹คํ–‰
if board[by][bx] == 1 {
print(count)
exit(0)
} else {
dfs(count, nowDir, bx, by)
}
}

// ์‹œ์ž‘ ์œ„์น˜๋ฅผ ์ฒญ์†Œํ•˜๊ณ  dfs ์‹คํ–‰
// ์—ฌ๊ธฐ์„œ ํ—ท๊ฐˆ๋ฆฌ๋ฉด ์•ˆ๋˜๋Š” ์ ์€
// ์ง€๋„ ์ƒ์—์„œ rows๊ฐ€ ์œ„์•„๋ž˜๋กœ ์ด๋™ํ•˜๋Š” ๊ฐ’์ด๊ณ  cols๊ฐ€ ์ขŒ์šฐ๋กœ ์ด๋™ํ•˜๋Š” ๊ฐ’์ž„
// x๊ฐ’ = c, y๊ฐ’ = r ์ด๋ผ๋Š” ๋ง.

// ๋ฌด์กฐ๊ฑด ์ œ์ž๋ฆฌ ์ฒญ์†Œํ•จ.
board[r][c] = 2
Comment on lines +97 to +98
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์—ฌ๊ธฐ ์ฝ”๋“œ์— ์˜๋ฌธ์ด ์žˆ์–ด์š”!

dfs๋ฅผ ๋“ค์–ด๊ฐ€๋ฉด, ํ˜„์žฌ ์œ„์น˜๊ฐ€ ์ฒญ์†Œ๋˜์—ˆ๋‚˜? ์ฒดํฌํ•˜๊ณ  ์ฒญ์†Œ๋ฅผ ํ•˜์ž–์•„์š”

// 1. ํ˜„์žฌ ์œ„์น˜๊ฐ€ ์ฒญ์†Œ๋˜์ง€ ์•Š์•˜๋‹ค๋ฉด -> ์ฒญ์†Œ
    if board[y][x] == 0 {
        board[y][x] = 2
    }

์—ฌ๊ธฐ์„œ ์ฒ˜๋ฆฌ๋ฅผ ํ•œ๋‹ค๊ณ  ์ดํ•ด๋ฅผ ํ–ˆ๋Š”๋ฐ,
๋ฉ”์ธ์ฝ”๋“œ์—์„œ ์ œ์ž๋ฆฌ ์ฒญ์†Œ๋ฅผ ์ฒดํ‚นํ•˜๊ณ  ํ•จ์ˆ˜๋กœ ๋„˜์–ด๊ฐ€๋Š” ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š” ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค ๊ธธ, ์ค‘๋ณต์ฒญ์†Œ๊ธดํ•˜๋„ค์š”. ๋‹ค์‹œ ๊ธฐ์–ต์„ ๋”๋“ฌ์–ด๋ณด๋‹ˆ , ์ €๋„ ์‚ฌ์‹ค ์ฒ˜์Œ์— ๊ทธ๋ƒฅ ์• ์ดˆ์— ์ฒญ์†Œํ•œ๊ฑฐ๋ผ๊ณ  countํ•˜๊ณ  ์‹œ์ž‘ํ• ๊นŒ ์•„๋‹ˆ๋ฉด ์–ด๋–ป๊ฒŒํ• ๊นŒ ? ๊ณ ๋ฏผํ–ˆ์—ˆ๋Š”๋ฐ์š” .
์ฆ‰, board[r][c] = 2๋ฅผ ํ•œ ์ด์œ ๋Š” dfs ์•ˆ์—์„œ๋Š” โ€œ์ฒญ์†Œ ์•ˆ ๋˜์–ด ์žˆ๋Š” ์นธโ€๋งŒ ์ฒญ์†Œํ•˜๋ฏ€๋กœ ์‹œ์ž‘ ์œ„์น˜๋ฅผ ๋ฏธ๋ฆฌ ์ฒญ์†Œ ์ฒ˜๋ฆฌํ•˜๊ณ , result = 1๋กœ ์‹œ์ž‘ํ•ด์„œ โ€œ๋ฐฉ 1๊ฐœ๋Š” ์ฒญ์†Œํ•จโ€์ด๋ผ๊ณ  ์…€ ์ˆ˜ ์žˆ๊ฒŒ ํ•œ ๊ฒƒ์ด๋ž€ ์˜๋„๊ฐ€ ์žˆ์—ˆ์–ด์š”.

๋งŒ์•ฝ์— ์ € ์ฝ”๋“œ๊ฐ€ ์—†๋‹ค๋ฉด dfs ๋‚ด๋ถ€์—์„œ ์ฒซ ์ฒญ์†Œ๊ฐ€ ์ผ์–ด๋‚˜๊ณ , count = 0์—์„œ ์‹œ์ž‘ํ•ด๋„ ๊ฒฐ๊ณผ๋Š” ๋™์ผํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์–ด์š”. ์ฆ‰, ์‹œ์ž‘ ์œ„์น˜ ์ฒญ์†Œ๋ฅผ ์–ด๋””์„œ ์ •ํ• ์ง€์— ๋Œ€ํ•œ ์ƒ๊ฐ ์ฐจ์ด์˜€๋˜๊ฑฐ๊ฐ™์•„์š”.

board[r][c] = 2         // ๋ฏธ๋ฆฌ ์ฒญ์†Œํ–ˆ๋‹ค๊ณ  ์„ ์–ธํ•˜๊ณ 
var result = 1          //  "1์นธ ์ฒญ์†Œํ–ˆ์Œ" ์œผ๋กœ ์‹œ์ž‘
dfs(result, d, c, r)    // ๊ทธ๋ž˜์„œ dfs์—์„  ์ด๋ฏธ ์ฒญ์†Œ๋๋‹ค๊ณ  ์ „์ œ

ํ˜น์‹œ ๋‹ต๋ณ€์ด ๋˜์—ˆ์„๊นŒ์šฉ ? ๊ทผ๋ฐ ์‚ฌ์‹ค ์ค‘๋ณต์ฝ”๋“œ ๊ฐ™์•„์„œ ๋ฆฌํŒฉํ† ๋งํ•  ํ•„์š”๊ฐ€ ์žˆ์–ด๋ณด์ž…๋‹ˆ๋‹ค.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ข‹์€ ๋‹ต๋ณ€ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
์ฝ”ํ…Œ๋ฅผ ํ•˜๋ฉด ์ค‘๋ณต ์ฝ”๋“œ๊ฐ€ ์ •๋ง ๋งŽ์•„์ง€์ฃ !
๋ฌผ๋ก  ์ฝ”ํ…Œ์ธก๋ฉด์—์„œ๋Š” ๋ณ„ ๋ฌธ์ œ๊ฐ€ ์—†์œผ๋‹ˆ ์ž˜ ์ง  ์ฝ”๋“œ๋ผ๊ณ  ์ƒ๊ฐํ•ด์š”!!
์ €๋„ ์ด๋Ÿฐ ์ค‘๋ณต ์ฝ”๋“œ์— ๋Œ€ํ•œ ๋ฐ˜์„ฑ & ์ธ์‚ฌ์ดํŠธ๋ฅผ ์–ป๊ฒŒํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. :)

var result = 1
dfs(result, d, c, r)
1 change: 1 addition & 0 deletions YooGyeongMo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
| 1์ฐจ์‹œ | 2025.03.30 | ๊ตฌํ˜„ | [์œ ์—ฐ ๊ทผ๋ฌด์ œ](https://school.programmers.co.kr/learn/courses/30/lessons/388351?language=swift)|https://github.com/AlgoLeadMe/AlgoLeadMe-14/pull/5|
| 2์ฐจ์‹œ | 2025.04.10 | DP | [ํŒŒ์ดํ”„ ์˜ฎ๊ธฐ๊ธฐ 1](https://www.acmicpc.net/problem/17070)|https://github.com/AlgoLeadMe/AlgoLeadMe-14/pull/9|
| 3์ฐจ์‹œ | 2025.05.01 | ๊ตฌํ˜„ | [ ์ƒ‰์ข…์ด ](https://www.acmicpc.net/problem/2563)|https://github.com/AlgoLeadMe/AlgoLeadMe-14/pull/18|
| 4์ฐจ์‹œ | 2025.05.01 | DFS/BFS | [ ๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ ](https://www.acmicpc.net/problem/14503)|https://github.com/AlgoLeadMe/AlgoLeadMe-14/pull/22|
---