1. 程式人生 > >gym 101124 Problem E. Dance Party(概率)

gym 101124 Problem E. Dance Party(概率)

Problem E. Dance Party

Time limit: 0.5 secondsMemory limit: 256 megabytes

Dance parties, whether formal balls or less formal events, usuallyhave dress codes for the guests. The code may be more or lessstrict. In case of a formal ball, the style of music and dances,such as Classicism, Empire, Rococo, Romantism, Biedermeier,Modernism, also determines the dress code. In less formal parties,any simple unusual idea can be good fun.

For one party, it was decided to assign a color for each guest. Thecolors would be drawn in advance and everyone would have tocome dressed in the assigned color. Each color would be assignedto two persons and guests with matching colors would form pairsfor the first dance. Everything looked fine until it was found thatthe color lists for ladies and gentelmen were not separate; instead,everyone drew their color from one big list. Thus, it was possible,that a pair will be formed either by a gentelman and a lady, ortwo ladies, or even two gentelmen. The organizer of the eventresponded to the concerns with “the probability of a male-malepair is extremely low”, but Pat still suspects that the probabilityof getting at least one such pair is too high. To compute theactual probability, he asked the organizer to provide the numberof colors and the numbers of ladies and gentelmen expected toparticipate in the dance. Having gotten these, he now wondershow to actually compute the probability.

Input

The only line of input contains three integers C, M and F(1 C,M,F 109; M +F 2C), the numbers of colors, gentel-men, and ladies, respectively.