[Baekjoon-Python] 15685 : 드래곤 커브
https://www.acmicpc.net/problem/15685 접근 0:우, 1:상, 2:좌, 3:하로 방향 인덱스를 정한다. k세대 드래곤 커브의 방향은 k - 1세대 드래곤 커브의 방향을 역순으로 순회하면서 1씩 증가한다. 풀이 from sys import stdin dragon = [[False] * 101 for _ in range(101)] direction = [(0, 1), (-1, 0), (0, -1), (1, 0)] for _ in range(int(stdin.readline())): x, y, d, g = map(int, stdin.readline().split()) dragon[y][x] = True # (1) y += direction[d][0] x += direction[d]..
2024. 1. 20.