UVA 11292

There is no doubt that the strong knight should take care of the strong dragon.

So we can sort the knights by their ability increasingly. As for dragon, ditto.  From the first knight to the last one, if the  knight can kill the current dragon (from the first to the last too), it does. Otherwise, let the next knight try.

 

posted @ 2012-11-16 14:56  HardWay  阅读(129)  评论(0)    收藏  举报