방향, 거리에따른 위치 변환 후 계산 import sys input = sys.stdin.readline N, M = map(int, input().split()) K = int(input()) store = [] for _ in range(K): store_dir, dist = map(int, input().split()) if store_dir==1: y = M x = dist elif store_dir==2: y=0 x = dist elif store_dir==3: x=0 y=M-dist else: x=N y = M-dist store.append([x,y]) dongguen_dir, dist = map(int, input().split()) if dongguen_dir==1: y = M x = d..