Back and Forth

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

There are nn stations and mm directed roads between them.

One day, Chiaki is going from the ss-th station to the tt-th station, then back to the ss-th station. Doing so, he needs to buy tickets for stations he passes. The price the tickets for the ii-th station is p_ip\_i. If Chiaki buys a ticket for the ii-th station, he can passes the station as many times as he wants. Find the minimum price of tickets to buy.

입력

There are multiple test cases. The first line of the input contains an integer TT (1T2001 \leq T \leq 200) indicating the number of test cases. For each test case:

The first line of each test case contains four integers nn, mm, ss and tt (1n2001 \leq n \leq 200, 0mn×(n1)0 \leq m \leq n \times (n - 1), 1s,tn1 \leq s, t \leq n). The second line contains nn integers p_1,p_2,,p_np\_1, p\_2, \dots, p\_n (1p_i1001 \leq p\_i \leq 100). The ii-th of the following mm lines contains two integers a_ia\_i and b_ib\_i, which denote a road from the a_ia\_i station to the b_ib\_i-th station (1a_i,b_in1 \leq a\_i, b\_i \leq n).

The sum of all nn does not exceed 200200.

출력

For each test case, output an integer denoting the answer. Print 1-1 for no solution.