Sunday, March 15, 2009


There are M^3 Pokemons characterized by three different skills ("attack", "defense", "beauty"), each ranging from 1 to M. A subset containing N of the Pokemon are the bad pets. We want to select one of the other Pokemon to be a Hero. The Hero must beat each of the bad pets in at least one skill (not necessarily the same skill for all the bad pets).

The task is to compute the number of Pokemon that can be selected to be the Hero.

No comments:

Post a Comment