| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1289 人关注过本帖
标题:算法分析的题
只看楼主 加入收藏
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
快速回复:算法分析的题
数据加载中...
 
   



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

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