코테 연습 BFS/DFS 첫 번째 https://www.acmicpc.net/problem/13023 13023번: ABCDE 문제의 조건에 맞는 A, B, C, D, E가 존재하면 1을 없으면 0을 출력한다. www.acmicpc.net import sys input = lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(2001) N, M = map(int, input().split()) relation = [[] for _ in range(N)] for _ in range(M): p_1, p_2 = map(int, input().split()) relation[p_1].append(p_2) relation[p_2].append(p_1) def ..