当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
4 1 2 3 4 5 6 1 6 4 1 2 3 4 5 6 7 8
4 2
A and B are friends(direct or indirect), B and C are friends(direct or indirect), then A and C are also friends(indirect). In the first sample {1,2,5,6} is the result. In the second sample {1,2},{3,4},{5,6},{7,8} are four kinds of answers.
Author | lxlcrystal@TJU |
Recommend | lcy |
时间上限 | 内存上限 |
5000/1000MS(Java/Others) | 327680/102400K(Java/Others) |