title: Facebook Hacker Cup: Power Overwhelming
body: <p>A lot of people at Facebook like to play Starcraft II™. Some of them have made a custom game using the Starcraft II™ map editor. In this game, you play as the noble Protoss defending your adopted homeworld of Shakuras from a massive Zerg army. You must do as much damage to the Zerg as possible before getting overwhelmed. You can only build two types of units, shield generators and warriors. Shield generators do no damage, but your army survives for one second per shield generator that you build. Warriors do one damage every second. Your army is instantly overrun after your shield generators expire. How many shield generators and how many warriors should you build to inflict the maximum amount of damage on the Zerg before your army is overrun? Because the Protoss value bravery, if there is more than one solution you should return the one that uses the most warriors.</p>
  
  <h2>Constraints</h2>
  
  <ul>
  <li>1 ≤ G (cost for one shield generator) ≤ 100</li>
  <li>1 ≤ W (cost for one warrior) ≤ 100</li>
  <li>G + W ≤ M (available funds) ≤ 1000000000000 (10<sup>12</sup>)</li>
  </ul>