SP28465 TAP2016K - Koalas
Description
**\[Due to SPOJ restrictions, this problem has been modified with respect to the original version used in the Argentinian Programming Tournament of 2016 in order to have multiple test cases per input file. The original version of this problem (in Spanish) can be found at \]**
Mabel Eucaliptos ha pasado toda la noche entren\\'andose en el arte de comer hojas de eucalipto. Finalmente est\\'a preparada para enfrentar a su malvada archin\\'emesis, Pac\\'ifica, en un \\'ultimo juego que intentar\\'a decidir de una vez por todas qui\\'en de las dos es la mejor koala.
Input Format
There are multiple test cases in the input file. For each test case, the first line contains three integer numbers **N**, **M** y **P**, representing the number of trees in the forest, the tree where Mabel starts, and the tree where Peaceful starts, respectively (**2 ****10 $ ^{5} $** and **1** ****M, P** ****N** with **M ≠ P**). The second line contains **N** integer numbers **C $ _{1} $ , C $ _{2} $ , ..., C $ _{N} $** , representing **C $ _{i} $** the number of leaves contained in the **i**-th tree (**1** ****C $ _{i} $** ****100** for **i = 1, 2, ..., N**). Each of the following **N-1** lines contains two integer numbers **U** and **V**, representing that there is a rope connecting trees number **U** and **V** (**1** ****U, V** ****N** with **U ≠ V**).****************
Output Format
For each test case, output a single line containing an integer number, representing the difference between the number of leaves eaten by Mabel and the number of leaves eaten by Peaceful if both of them play optimally.