[提交][状态][讨论版]

## 题目描述

A wizard is in a labyrinth where there are V rooms and V

## 输入

The rst line of each case contains four integers: the number V of rooms in the maze (1 <= V <= 1 500),
the number C of locks (0 <= C < V ), and rooms X and Y numbered 0; 1; : : : ; V

## 输出

There is one line of output per test case. If there is no solution, output Impossible. Otherwise print the
full path corresponding to your solution in the format L: V0 : : : VL, where L <= 4(C + 1)V is the length of a
path from X to Y , and X = V0; V1; : : : ; VL

## 样例输入

1 0 0 0

3 1 0 2
1
0 1 -1
0 2 0

3 2 0 2
1 2
0 1 1
0 2 0

5 3 0 4
2 0 3
0 1 0
0 2 -1
1 3 1
2 4 2

0 0 0 0

## 样例输出

0: 0
3: 0 1 0 2
Impossible
10: 0 2 0 1 0 1 3 1 0 2 4

[提交][状态][讨论版]