24581 [백준 2458번] 키 순서 https://www.acmicpc.net/problem/2458import sysinput = sys.stdin.readlineN, M = map(int,input().split())graph = [[] for _ in range(N+1)]r_graph = [[] for _ in range(N+1)]up_count = [0]*(N+1)down_count = [0]*(N+1)up_set = [set() for _ in range(N+1)]down_set = [set() for _ in range(N+1)]answer = 0for _ in range(M): a, b = map(int,input().split()) graph[a].append(b) r_graph[b].append(a)def .. 2024. 10. 29. 이전 1 다음