Unbranched

AtCoder
IDabc180_f
Time2000ms
Memory256MB
Difficulty
Find the number of graphs with $N$ labeled vertices and $M$ unlabeled edges, not necessarily simple or connected, that satisfy the following conditions, modulo $(10^9+7)$: * There is no self-loop; * The degree of every vertex is at most $2$; * The maximum of the sizes of the connected components is exactly $L$. ## Constraints * $2 \leq N \leq 300$ * $1\leq M \leq N$ * $1 \leq L \leq N$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $N$ $M$ $L$ [samples]
Samples
Input #1
3 2 3
Output #1
3

When the vertices are labeled $1$ through $N$, the following three graphs satisfy the condition:

*   The graph with edges $1-2$ and $2-3$;
*   The graph with edges $1-2$ and $1-3$;
*   The graph with edges $1-3$ and $2-3$.
Input #2
4 3 2
Output #2
6
Input #3
300 290 140
Output #3
211917445
API Response (JSON)
{
  "problem": {
    "name": "Unbranched",
    "description": {
      "content": "Find the number of graphs with $N$ labeled vertices and $M$ unlabeled edges, not necessarily simple or connected, that satisfy the following conditions, modulo $(10^9+7)$: *   There is no self-loop; ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc180_f"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number of graphs with $N$ labeled vertices and $M$ unlabeled edges, not necessarily simple or connected, that satisfy the following conditions, modulo $(10^9+7)$:\n\n*   There is no self-loop;\n...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments