Elements of the Theory of Auctions and Contests