F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Rikka with graph

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 243    Accepted Submission(s): 18


Problem Description
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:


A non-directed graph $G$ has no multiple edges and self loops. If every connected component of G has an EulerĄ¯s circuit, we call G perfect. Now Yuta wants to know the numbers of different perfect graphs which has $n$ vertices and no less than $m$ edges (In this problem, we think all the $n$ vertices are different from each other)


It is too difficult for Rikka. Can you help her?
 

Input
This problem has multi test cases (no more than $100$). For each test case, The first line contains two numbers $n,m(1 \leq n \leq 10^{18}, 0 \leq m \leq 80)$.
 

Output
For each test cases print only one number ¨C the answer. The answer may be very large, so you only print is module $1e9+7$.
 

Sample Input
3 0 4 0
 

Sample Output
2 8
 

Hint
For the first case, there are two possible ways. First one is that there is no edge in the graph.
Second one is that there is a edge between every two distinct vertices.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-11 13:21:07, Gzip enabled