# Jump Game
## Problem Statement
You are given an array of $n$ integers, $\text{arr}_1, \text{arr}_2, \ldots, \text{arr}_n$. You start at a given source index $src$. From any index $i$ ($1 \le i \le n$), you can perform two types of moves:
1. **Adjacent Move**: Move to an adjacent index $i-1$ (if $i > 1$) or $i+1$ (if $i < n$). This move costs $b$.
2. **Value Jump**: Move to any other index $j$ ($1 \le j \le n$, $j \neq i$) such that $\text{arr}_j = \text{arr}_i$. This move costs $a$.
Your task is to find the minimum cost to reach every index $k$ (from $1$ to $n$) starting from the source index $src$. Output these minimum costs for all indices in order from $1$ to $n$.
## Input Format
- The first line contains three integers: $n$ ($1 \le n \le 2 \times 10^5$), $a$ ($1 \le a \le 10^9$), and $b$ ($1 \le b \le 10^9$). Here, $n$ is the size of the array, $a$ is the cost for a value jump, and $b$ is the cost for an adjacent move.
- The second line contains $n$ integers: $\text{arr}_1, \text{arr}_2, \ldots, \text{arr}_n$ ($1 \le \text{arr}_i \le 100$). These are the elements of the array.
- The third line contains a single integer: $src$ ($1 \le src \le n$). This is the 1-indexed source index.
## Output Format
Print $n$ space-separated integers, representing the minimum cost to reach each index from $1$ to $n$ starting from $src$. The $k$-th integer should be the minimum cost to reach index $k$.
## Sample Test Cases
### Sample Input 1
```
10 1 2
1 2 1 1 2 3 2 3 2 1
1
```
### Sample Output 1
```
0 2 1 1 3 5 3 5 3 1
```
### Sample Input 2
```
1 1 2
7
1
```
### Sample Output 2
```
0
```
## Constraints
- $1 \le n \le 2 \times 10^5$
- $1 \le a, b \le 10^9$
- $1 \le \text{arr}_i \le 100$ for all $1 \le i \le n$
- $1 \le src \le n$
- Time limit: 1 second
- Memory limit: 256 MB
## Explanation
For Sample Test 1:
Starting from index $src=1$ (where $\text{arr}_1=1$), the shortest distances are computed by considering two types of moves:
- Adjacent moves: cost $b=2$. For example, $1 \to 2$ costs $2$.
- Value jumps: cost $a=1$. For example, from index $1$ (value $1$), we can jump to index $3$ (value $1$) with cost $1$.
Using a shortest path algorithm (like Dijkstra's) on the implicitly defined graph, the minimum distances to each index are $[0, 2, 1, 1, 3, 5, 3, 5, 3, 1]$.
For Sample Test 2:
There is only one index, $n=1$. The source index is $src=1$. The minimum cost to reach index $1$ from itself is $0$.
Loading problem statement...