khsh5592   3년 전

As with any airline, K of these farms (1 <= K <= 100, K <= N) have been selected as hubs. The farms are conveniently numbered 1..N, with farms 1..K being the hubs.

The ith trip is from farm a_i to farm b_i. In order to get from a_i to b_i, the trip may include any sequence of direct flights (possibly even visiting the same farm multiple times), but it must include at least one hub (which may or may not be the start or the destination). This requirement may result in there being no valid route from a_i to b_i

K 값은 Hub 라고 되어있어서, 만약 K = 2 인 경우 1, 2 번 Farm 이 Hub 에 해당하며,

모든 경로는 3 -> 4가 될 수 없고  

3 -> 1(Hub) -> 4 되거나 3 -> 2(Hub) -> 4 와 같이

Hub 를 경유해야 한다는 뜻이 맞나요

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