Logo
(追記) (追記ここまで)

24559번 - Gambling Game 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB2210956.250%

문제

The Ionian Commission on Procuring Cash has come up with a new gambling game to raise funds for the government. The game is played as follows: Each week, the government will televise a set of $m$ balls (numbered 1ドル \ldots m$) being selected one at a time without replacement. Anyone who wants to play will have to buy a game card. Each card contains $n$ squares (where $n \leq m/2$) and in each square are two numbers between 1 and $m$. No number appears more than once on a card. A sample card is shown in Figure E.1.

Figure E.1: Sample game card with m = 10, n = 4 and p = 5.

After each ball is selected, players cover any square which contains that number (there will be at most one such square on any card). Each game card also has a number $p$ printed on it, and a contestant wins if he or she covers all $n$ squares after exactly $p$ ball selections (i.e., prior to the $p^{\text{th}}$ selection, they only had $n-1$ squares covered). Before issuing cards to its citizens, the government would like to get an idea of the likelihood of winning for various values of $m, n$ and $p$ so they can set up the payoffs appropriately. They have procured you to write a program to solve this problem.

입력

Input consists of a single line containing 3 integers $m, n$ and $p,ドル as described above, where 2ドル \leq m \leq 33,ドル 0ドル \leq n \leq m/2$ and 0ドル \leq p \leq m$.

출력

Output the probability of winning on the $p^{\text{th}}$ selection as a fraction x/y in simplest form.

제한

예제 입력 1

10 4 5

예제 출력 1

8/45

예제 입력 2

10 4 3

예제 출력 2

0/1

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2021 East Central Regional Contest E번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /