[Python] ๋ฐฑ์ค #14502 - ์ฐ๊ตฌ์
๋ฌธ์ https://www.acmicpc.net/problem/14502 14502๋ฒ: ์ฐ๊ตฌ์ ์ธ์ฒด์ ์น๋ช
์ ์ธ ๋ฐ์ด๋ฌ์ค๋ฅผ ์ฐ๊ตฌํ๋ ์ฐ๊ตฌ์์์ ๋ฐ์ด๋ฌ์ค๊ฐ ์ ์ถ๋์๋ค. ๋คํํ ๋ฐ์ด๋ฌ์ค๋ ์์ง ํผ์ง์ง ์์๊ณ , ๋ฐ์ด๋ฌ์ค์ ํ์ฐ์ ๋ง๊ธฐ ์ํด์ ์ฐ๊ตฌ์์ ๋ฒฝ์ ์ธ์ฐ๋ ค๊ณ ํ๋ค. ์ฐ๊ตฌ์๋ ํฌ www.acmicpc.net ํ์ด import sys from collections import deque import copy n,m = map(int,input().split()) arr = [list(map(int,sys.stdin.readline().strip().split())) for _ in range(n)] dx = [-1,0,1,0] dy = [0,1,0,-1] def makeWall(cnt): # ์์ ํ์์ผ๋ก ๋ฒฝ์..
[Python] ๋ฐฑ์ค #2583 - ์์ญ ๊ตฌํ๊ธฐ
๋ฌธ์ https://www.acmicpc.net/problem/2583 2583๋ฒ: ์์ญ ๊ตฌํ๊ธฐ ์ฒซ์งธ ์ค์ M๊ณผ N, ๊ทธ๋ฆฌ๊ณ K๊ฐ ๋น์นธ์ ์ฌ์ด์ ๋๊ณ ์ฐจ๋ก๋ก ์ฃผ์ด์ง๋ค. M, N, K๋ ๋ชจ๋ 100 ์ดํ์ ์์ฐ์์ด๋ค. ๋์งธ ์ค๋ถํฐ K๊ฐ์ ์ค์๋ ํ ์ค์ ํ๋์ฉ ์ง์ฌ๊ฐํ์ ์ผ์ชฝ ์๋ ๊ผญ์ง์ ์ x, y์ขํ๊ฐ๊ณผ ์ค www.acmicpc.net ํ์ด import queue import sys from collections import deque m,n,k = map(int,input().split()) arr = [[0]*n for _ in range(m)] for _ in range(k): a,b,c,d = map(int,sys.stdin.readline().strip().split()) for i in ran..