https://www.acmicpc.net/problem/19237
2021/04/20 β 2021/04/22
KB
ms
μμ)
shark_prio[0] = [[2, 3, 1, 4], [4, 1, 2, 3],[3, 4, 2, 1], [4, 3, 1, 2]]
shark_prio[1] = [[x, x, x, x], [x, x, x, x],[x, x, x, x], [x, x, x, x]]
shark_prio[2] = [[x, x, x, x], [x, x, x, x],[x, x, x, x], [x, x, x, x]]
shark_prio[3] = [[x, x, x, x], [x, x, x, x],[x, x, x, x], [x, x, x, x]]
DIRECTION = 2
LIVE = 1
DEAD = 0
N, M, K = map(int, input().split())
shark_info = [[] for _ in range(M)]
shark_smell = [[[0, 0] for _ in range(N)] for _ in range(N)]
shark_prio = [[] for _ in range(M)]
# μμ΄μ [xμ’ν, yμ’ν, λ°©ν₯, μμ¬μ¬λΆ]λ₯Ό μ μ₯νκ³ μλ λ°°μ΄ μ
λ ₯λ°κΈ°
def get_shark_info():
global N, M, shark_info, LIVE
for i in range(N):
_map = list(map(int, input().split()))
for j in range(N):
if _map[j] != 0:
shark_info[_map[j]-1].append(i)
shark_info[_map[j]-1].append(j)
_dir = list(map(int, input().split()))
for i in range(M):
shark_info[i].append(_dir[i]-1)
shark_info[i].append(LIVE)
# μμ΄μ μ°μ μμλ₯Ό μ μ₯νλ λ°°μ΄ μ
λ ₯λ°κΈ°
def get_shark_prio():
global N, M, shark_prio
for i in range(M):
for j in range(4):
_dir = list(map(int, input().split()))
shark_prio[i].append(_dir)
get_shark_info()
get_shark_prio()