CF715B Complete The Graph

Description

ZS the Coder has drawn an undirected graph of $ n $ vertices numbered from $ 0 $ to $ n-1 $ and $ m $ edges between them. Each edge of the graph is weighted, each weight is a positive integer. The next day, ZS the Coder realized that some of the weights were erased! So he wants to reassign positive integer weight to each of the edges which weights were erased, so that the length of the shortest path between vertices $ s $ and $ t $ in the resulting graph is exactly $ L $ . Can you help him?

Input Format

N/A

Output Format

N/A

Explanation/Hint

Here's how the graph in the first sample case looks like : ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF715B/c442fd279761bfa74ef367b518cede1e1fa97983.png)In the first sample case, there is only one missing edge weight. Placing the weight of $ 8 $ gives a shortest path from $ 0 $ to $ 4 $ of length $ 13 $ . In the second sample case, there is only a single edge. Clearly, the only way is to replace the missing weight with $ 123456789 $ . In the last sample case, there is no weights to assign but the length of the shortest path doesn't match the required value, so the answer is "NO".