mercredi 1 juillet 2015

white and the shadow forces in galaxy [on hold]

A war has been started between the White and the Shadow forces in the galaxy. The galaxy is considered to be a single dimensional infinite stretch on both sides. Only one force can attack the other at a time. The first one to attack are the White forces and the alternating turns continue. White have mobility of mw and shadow have mobility of ms. In each turn both the forces can move upto their mobility. (Ex. If a force is located at location 0 and have mobility of 10, then in its next turn it can move from -10 to 10 location.) Both the forces have their own attacking range described as aw and as respectively. In each turn after making the move, the force can attack the other force if it is in the attacking range of the force. (Ex. If the force with mobility of 5 is located at location 0 and has range of 10 while its enemy is at 15, it can attack its enemy in its turn by first moving to location 5 and then attacking). Given the initial distance between the two forces D, find if White forces will win or Shadow forces will win or the battle would not be concluded if both play optimally. Note that the force can attack in the same turn after making its move.

Aucun commentaire:

Enregistrer un commentaire