목록코딩트리조별과제 (1)
진취적 삶

문제 링크: https://www.codetree.ai/missions/5/problems/G-or-H-2?&utm_source=clipboard&utm_medium=text 코드 MAX_NUM = 100 n = int(input())# dp 처럼 우선 만들어두기 arr = [0] * (MAX_NUM + 1) for _ in range(n): x,c = input().split() x = int(x) if c == 'G': arr[x] = 1 elif c== 'H': arr[x] = 2max_len = 0 for i in range(MAX_NUM+1): for j in range(i+1,MAX_NUM+1): # i 와 j 위치에 사람이..
알고리즘
2024. 8. 23. 00:42