18 人解决,32 人已尝试。
32 份提交通过,共有 212 份提交。
6.1 EMB 奖励。
单点时限: 5.0 sec
内存限制: 256 MB
Our captain Jack Sparrow is again on the natives’ island where again the natives think he is a God. But Captain Jack ain’t giving in easily (especially when his life is at stake) and is trying to escape. The island is divided into different areas separated from one another by the many rivers abundant on the island. Two areas are adjacent if they are connected through a bridge. Of course captain Jack has to make it from the area where he’s been kept in captivity to the area where the Black Pearl, his dear ship, is located. Quite unfortunately, the natives are very eager to keep their “God” on the island so they have decided that they will guard some selection of the bridges by putting one man on each selected bridge. Now, our captain, being as unwilling as he is to spend any extra effort whatsoever on a job (as well as desirous of being merciful to his devotees), would like to incapacitate as few natives as possible on his way back. WARNING: Jack needs to make his decision QUICKLY!
Input consists of
Note that there may not be a path from the area where Captain Jack is being kept to the area of the Black Pearl. If this is the case, output should be a single line containing the following (quotes for clarity):
It’s over with Captain Jack. At least till Pirates of the Caribbean 3.
In case there is a path to the Black Pearl, output should be a single line containing (quotes for clarity):
x native(s) on the easiest way for Captain Jack.
where
6 5 1 5 0 1 0 0 2 0 1 2 0 1 3 1 3 4 0
It’s over with Captain Jack. At least till Pirates of the Caribbean 3.
7 11 0 6 0 1 0 0 2 1 1 2 0 1 3 1 2 4 0 1 5 1 3 5 0 3 4 1 3 6 0 4 5 1 5 6 1
1 native(s) on the easiest way for Captain Jack.
18 人解决,32 人已尝试。
32 份提交通过,共有 212 份提交。
6.1 EMB 奖励。