6585: Cat Snuke and a Voyage
时间限制: 1 Sec 内存限制: 128 MB
提交: 202 解决: 86
[提交] [状态] [讨论版] [命题人:admin]
题目描述
In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi Islands. For convenience, we will call them Island 1, Island 2, ..., Island N.
There are M kinds of regular boat services between these islands. Each service connects two islands. The i-th service connects Island ai and Island bi.
Cat Snuke is on Island 1 now, and wants to go to Island N. However, it turned out that there is no boat service from Island 1 to Island N, so he wants to know whether it is possible to go to Island N by using two boat ser