PivotOJ

Gambling Game

시간 제한: 1000ms메모리 제한: 1024MB출처: ICPC ECNA 2021-2022BOJ 24559

문제

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 mm balls (numbered 1m1 \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 nn squares (where nm/2n \leq m/2) and in each square are two numbers between 1 and mm. 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 pp printed on it, and a contestant wins if he or she covers all nn squares after exactly pp ball selections (i.e., prior to the pthp^{\text{th}} selection, they only had n1n-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,nm, n and pp 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,nm, n and pp, as described above, where 2m332 \leq m \leq 33, 0nm/20 \leq n \leq m/2 and 0pm0 \leq p \leq m.

출력

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

예제

예제 1

입력
10 4 5
출력
8/45

예제 2

입력
10 4 3
출력
0/1
코드를 제출하려면 로그인하세요.