请求修复<说明/提示>一栏的排版
查看原帖
请求修复<说明/提示>一栏的排版
385633
Imken楼主2022/12/25 15:47

rt.

说明/提示

Explanation of the sample:

One visualization of the paths is:

   1   2   3
   +---+---+  
       |   |
       |   |
 6 +---+---+ 4
      / 5
     / 
    / 
 7 +

Building new paths from 1 to 6 and from 4 to 7 satisfies the conditions.

   1   2   3
   +---+---+  
   :   |   |
   :   |   |
 6 +---+---+ 4
      / 5  :
     /     :
    /      :
 7 + - - - - 

Check some of the routes:

1 – 2: 1 -> 2 and 1 -> 6 -> 5 -> 2
1 – 4: 1 -> 2 -> 3 -> 4 and 1 -> 6 -> 5 -> 4
3 – 7: 3 -> 4 -> 7 and 3 -> 2 -> 5 -> 7

Every pair of fields is, in fact, connected by two routes.

It's possible that adding some other path will also solve the problem (like one from 6 to 7). Adding two paths, however, is the minimum.

https://www.luogu.com.cn/paste/84qf1vnk

2022/12/25 15:47
加载中...