AlgorithmOJ
Problem
Local Problems
All Problems
Problem Category
Status
Contest
Standard Contests
Replay Contests
Virtual Contests
Ranklist
More...
News
About
F.A.Q
Recent Contests
Coming Soon...
Login
Register
2026-10-05 04:16:05
瞬间移动
Time Limit:
2000ms
Memory Limit:
65536KB
This problem will be judged on
HDU
. Original ID:
5698
64-bit integer IO format:
%I64d
Java class name:
Main
Prev
Submit
Status
Statistics
Next
Font Size:
Description
有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第$n$行第$m$列的格子有几种方案,答案对$1000000007$取模。
Input
多组测试数据。
两个整数$n,m(2\leq n,m\leq 100000)$
Output
一个整数表示答案
Sample Input
4 5
Sample Output
10
Source
2016"百度之星" - 初赛(Astar Round2B)
Language:
C++
C++11
C++14
C
Java
Pascal
Python2
Python3
C#
Fortran
Perl
Ruby
Ada
SML
Visual C++
Visual C
CLang
CLang++
Theme:
Monokai
Solarized Light
Material
Share Code?
Yes
No
×
Login
Username:
Password:
Cookie:
Never
One Day
One Week
One Month
One Year
×
Register
Username:
Password:
Repeat Password:
Nickname:
School:
Email:
×
News Title
by