标题:算法分析的题
只看楼主
ronaldowsy
Rank: 1
等 级:新手上路
帖 子:68
专家分:0
注 册:2008-10-20
 问题点数:0 回复次数:2 
算法分析的题
Description

A chess rook can move horizontally or vertically to any square in the same row or in the same column of a chessboard.
Find the number of shortest paths by which a rook can move from one corner of a chessboard to the diagonally opposite corner。

Input

a interger number n is row and column of chessboard. 0 < n <=16

Output

the number of shortest paths.

Sample Input


3

or

4

Sample Output


6

or

20
搜索更多相关主题的帖子: 算法分析 
2008-11-25 19:07
ronaldowsy
Rank: 1
等 级:新手上路
帖 子:68
专家分:0
注 册:2008-10-20
得分:0 
麻烦高手们给我源代码,谢谢大家了
2008-11-25 21:20
ronaldowsy
Rank: 1
等 级:新手上路
帖 子:68
专家分:0
注 册:2008-10-20
得分:0 
帮帮忙啊高手们
2008-11-29 01:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-246191-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.192043 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved