完全图
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
只有形式化描述
给出 个正整数 ,以如下规则生成无向图 :
所有无向边的边权均为 1。
请你求出图 的直径,以及有多少对点的最短距离等于直径。
直径的定义为最短距离最大的两个点的最短距离值。
输入格式
第一行包含一个正整数 。
第二行包含一个长为 的字符串,表示 。
输出格式
输出一行两个正整数,表示直径和取到直径的点对个数。
样例 #1
样例输入 #1
8
10010022
样例输出 #1
4 2
提示
样例输入/输出 2
详见下发文件下的 ex_graph2.in/out。
这个数据满足第 个测试点的限制。
ex_graph1.in
ex_graph1.out
ex_graph2.in
ex_graph2.out
对所有数据,保证 。
测试点编号 | ||
---|---|---|
1121
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2024-11-21 14:00
- End at
- 2024-11-21 18:30
- Duration
- 4.5 hour(s)
- Host
- Partic.
- 24