Problem Statement for ec3s3

**Educational contest 3 Problem Senior 3 - A Simple Problem** *Jimmy loves cp problems that are simple but challenging (not important but yes)* Given an **undirected** graph with `N` nodes and `M` edges, determine the number of **distinct simple paths** that start at node `1` and end at node `N`. Formally, a path `A` is distinct from path `B` if it satisfies at least one of the following conditions: 1) Length of path `A` is not equal to the length of path `B` 2) There exists an index `i` where node `A[i]` does not equal node `B[i]` Just a reminder that a **simple path** does **not** contain any cycles. **Input specification** First line: two space-separated integers `N` (number of nodes) and `M` (number of edges) Next `M` lines: two space-separated integers `u` and `v` indicating that there is an undirected edge connecting nodes `u` and `v`. **Output specification** One integer: The number of distinct simple paths that start from node `1` and end at node `N`. **Constraints:** For all test cases: `1 ≤ N ≤ 18`; there are no two edges joining the same two nodes, and edges will not start and end on the same node. For 25% of the marks: `1 ≤ N ≤ 8` For the remaining 75%: No additional constraints **Sample input 1:** ``` 5 6 1 2 1 5 2 4 2 5 3 4 4 5 ``` **Sample output 1:** ``` 3 ``` **Reasoning:** The three paths are `[1, 5]`, `[1, 2, 5]`, and `[1, 2, 4, 5]` *Reminder that the judge allows you to submit code as a text file in case your code is too long*


🕑 Time limit: 5.0 seconds
 java: 8.0 seconds
 python: 10.0 seconds
⚎ Memory limit: 256.0 MB