seastar105   3년 전

Farmer John is taking Bessie and the cows on a cruise! They are sailing on a network of rivers with N ports (1 <= N <= 1,000) labeled 1..N, and Bessie starts at port 1. Each port has exactly two rivers leading out of it which lead directly to other ports, and rivers can only be sailed one way.

각 포트는 다른 포트로 연결되는 강이 정확히 두 개 있다고 하는데 이러기 위해선 N의 범위가 3이상으로 바뀌어야 할 거 같습니다. 유사코 원문도 N이 1이상 1000 이하인건 확인했지만, N이 1이거나 2인 케이스는 있을 수가 없습니다. 데이터 상에서 없는 것도 확인했습니다.

채점번호 : 22369389

댓글을 작성하려면 로그인해야 합니다.