题目链接:1339: 土豪fcbruce

Description

10年后,就职于Google的fcbruce赞助了武汉科技大学好多钱,学校因此决定扩建。第一步是新建宿舍楼,为了整洁美观,fcbruce建议将宿舍楼按n行m列布局且相邻的宿舍楼间有一条通道(所有通道和宿舍楼规格相同)。现在fcbruce想从1号宿舍走到n×m号宿舍(如下图是n=2,m=3的宿舍楼平面图)。已知fcbruce是个十分死板的懒人,他只想走宿舍楼间的通道且不想走多余的路程,聪明的你能告诉他有多少种不同的路线从1号宿舍走到n×m号宿舍吗?

Input

有多组测试数据,每组占1行,每行有两个数n,m(1<n<200,1<m<200),以文件结束标志结束读入数据

Output

每行输出一个整数为从1号宿舍走到n×m号宿舍的不同路线总数,这个数可能很大,请将其模1000007(10^6+7)后输出。

Sample Input

2 2
3 4
6 8
11 14
18 22
27 32
38 44
60 56
199 150
140 198

Sample Output

2
10
792
144059
941920
705658
82218
376356
850626
290435

HINT

1>2>3>6,1>2>5>6,1>4>5>6

分析

WUSTOJ 1339: 土豪fcbruce(Java)的更多相关文章

  1. WUSTOJ 1285: Factors(Java)

    1285: Factors 参考   hadis_fukan的博客--wustoj 1285 Factors 题目   输入一个数n,找出1~n之间(包括1,n)的质因子最多的数(x)的质因子个数(f ...

  2. WUSTOJ 1319: 球(Java)并查集

    题目链接:1319: 球 参考:wustoj 1319 球-wust_tanyao,并查集 并查集系列:WUSTOJ 1346: DARK SOULS(Java)并查集 Description Icy ...

  3. WUSTOJ 1283: Hamster(Java)

    1283: Hamster 参考博客 wust_tanyao的博客 题目   第0个月有1对仓鼠.仓鼠的寿命是M个月,仓鼠成年后每个月生一对仓鼠(一雌一雄),问N个月后有仓鼠多少对.更多内容点此链接 ...

  4. WUSTOJ 1282: Start(Java)

    1282: Start 题目   判断一个字符串是不是回文串.例如:"abcba"是回文串.更多内容点击标题. 分析   水题,自己思考. 代码 /** * time 838ms ...

  5. WUSTOJ 1349: TLE(Java)算法优化

    题目链接:1349: TLE Description WH在刷题时,设计出了如下代码: #include<stdio.h> int main() { int i, j, cnt, k, N ...

  6. WUSTOJ 1347: GCD(Java)互质

    题目链接:1347: GCD Description 已知gcd(a,b)表示a,b的最大公约数. 现在给你一个整数n,你的任务是在区间[1,n)里面找到一个最大的x,使得gcd(x,n)等于1. I ...

  7. WUSTOJ 1326: Graph(Java)费马数

    题目链接:1326: Graph 参考博客:HNUSTOJ-1617 Graph(费马数)--G2MI Description Your task is to judge whether a regu ...

  8. WUSTOJ 1325: Distance(Java)坐标计算

    题目链接:1325: Distance Description There is a battle field. It is a square with the side length 100 mil ...

  9. WUSTOJ 1313: 数列(Java)进制转换

    题目链接:

随机推荐

  1. Spring boot Security 登陆安全配置

    实现的效果 访问url时,如果未登录时跳转到Login界面,要求用户登陆,如果登陆过返回请求的数据. 效果图 访问数据时,未登录返回login界面 登陆操作 登陆成功进入登出界面 登陆成功后再次访问数 ...

  2. 简要介绍 X Window System (又称为X11 or X)

    X11是一个应用程序,而不是一个操作系统,主要功能是提供图形界面,实现架构和网络架构相同,有X Client和X Server组件,另外还有Window Manager和Display Manager ...

  3. css设置使文字显示2行多余的为省略号...

    1 2 3 4 5 6 7 8 9 10 11 12 .title{        font-size: .7rem;        line-height: 1.5rem;          ove ...

  4. Git是怎么Ignore文件的?

    Git is one of the most popular version control systems (VCS) available, especially thanks to hosting ...

  5. Centos7 中查找文件、目录、内容

    1.查找文件 find / -name ‘filename’ 2.查找目录 find / -name ‘path’ -type d 3.查找内容 find . | xargs grep -ri ‘co ...

  6. 远程桌面工具mRemoteNG与Tsmmc

    一.Tsmmc.msc远程管理工具.1.下载链接:https://pan.baidu.com/s/1tV_xP-ITWyKKzAxLSlGxlw 密码:0jrt 将目录下的mstsmhst.dll.m ...

  7. MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.

    MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server ...

  8. 阿里云 商标 SAAS

    商标注册-注册商标查询-商标交易平台-阿里云商标https://tm.aliyun.com/#/ 阿里云商标查询入口-云栖社区-阿里云https://yq.aliyun.com/articles/69 ...

  9. Web Application Framework

    ASP.NET Boilerplate https://github.com/aspnetboilerplate ASP.NET Boilerplate - Web Application Frame ...

  10. 六、postman做ui测试

    一.思路 发请求去拿到网站的响应——>html 解析html标签,判断一些元素是否显示 二.目的 快速检查ui是否正确 三.用到的库 Cheerio https://cheerios.js.or ...