[Python] ๋ฐฑ์ค€ 14503 - ๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ
ยท
Algorithm
https://www.acmicpc.net/problem/14503 14503๋ฒˆ: ๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ ๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ์ฒญ์†Œํ•˜๋Š” ์˜์—ญ์˜ ๊ฐœ์ˆ˜๋ฅผ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. ๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ๊ฐ€ ์žˆ๋Š” ์žฅ์†Œ๋Š” N×M ํฌ๊ธฐ์˜ ์ง์‚ฌ๊ฐํ˜•์œผ๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ์œผ๋ฉฐ, 1×1ํฌ๊ธฐ์˜ ์ •์‚ฌ๊ฐํ˜• ์นธ์œผ๋กœ ๋‚˜๋ˆ„์–ด www.acmicpc.net # n x m n, m = map(int, input().split()) #์ขŒํ‘œ๊ฐ’, ๋ฐฉํ–ฅ x, y, d = map(int, input().split()) #์ฒญ์†Œํ–ˆ๋Š”์ง€ ์•ˆํ–ˆ๋Š”์ง€ ์ฒดํฌ cheak = [[0]*m for _ in range(n)] #MAP arr = [] for i in range(n): arr.append(list(map(int, input().split()))) #๋ฐฉํ–ฅ ๋ถ๋™๋‚จ์„œ d..