c语言sscanf函数的用法是什么
301
2022-11-19
HDU - 2018杭电ACM集训队单人排位赛 - 2 - Problem E. Travel
Problem E Travel
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 138 Accepted Submission(s): 66
Problem Description
It is said Guilin's scenery is the best in the world. Now since the first Guangxi Province Collegiate Programming Contest is held in Guilin, Luras decided to travel around Guilin. She knows that there will be n nodes in the travel map. Luras will pick a shortest way to go from node 1 to node n. You are a city designer who could decide if there is a bi-directional edge with the length of 1 between every two nodes. And you hope to build the roads to make the shortest path from 1 to n to be as many as possible. Could you tell Luras how many shortest path could it be at most between node 1 and node n in your final city graph?
Input
The first line is an integer T which indicates the case number.
And as for each case, there will be one lines
In the line, there is 1 integer n, which indicates the number of node.
It is guaranteed that——
T is about 100.
for 100% cases, 2 <= n <= 40.
Output
As for each case, you need to output a single line.
There should be one integer in the line which means the maximum shortest path could be between node 1 and node n.
Sample Input
6
2
3
4
5
6
7
Sample Output
1
1
2
3
4
6
AC 代码
#include
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~